ThreadRailSign in

Use ThreadRail from the command line

Run your outreach and CRM from the terminal. See what needs you, read campaign results, move deals and approve emails with the same rules, roles and audit trail as the ThreadRail app.

Install

npm install -g @rajoka/threadrail
  • Node 24 or later.
  • macOS or Linux to sign in as yourself. On Windows, use a machine token for now.

Use -g so threadrail works from any folder.

Sign in

  1. Run threadrail login.
    threadrail login
  2. Press Enter to open the sign-in page, or open the address it shows. Check the code matches, then approve with your Rajoka ID and two-step sign-in.
  3. The first time, ThreadRail asks you to approve the connection for your workspace and choose its level. threadrail login shows that page and waits for you.
  4. When you see "Ready. You can now use threadrail.", you are done.

What you can do

Today and inbox

  • Search contacts contacts.search

    Find a contact by name, email, firm or company number, with their firm and where they are in your campaigns.

    Read only
    threadrail contacts.search
  • Get a company companies.get

    See one firm in full: its Companies House details, contacts, campaign progress and the researched facts with their sources.

    Read only
    threadrail companies.get --company_id <company_id>
  • Get a thread or a contact's messages threads.get

    Read one conversation, or every message with one contact.

    Read only
    threadrail threads.get
  • List what needs you needs_you.list

    See the replies waiting for you, most urgent first, each with a short summary.

    Read only
    threadrail needs_you.list
  • List next steps due due_next_steps.list

    See what is due today: deal next steps that are due or overdue, and conversations due a follow-up.

    Read only
    threadrail due_next_steps.list
  • Latest Monday digest latest_digest.get

    Read this week's Monday summary: the week's numbers and what happened.

    Read only
    threadrail latest_digest.get
  • Mark a thread handled threads.handled.update

    Mark a conversation as handled so it leaves Needs you. Nothing is sent.

    Makes changes
    threadrail threads.handled.update --thread_id <thread_id>

Campaigns and results

  • Campaign figures campaign_stats.list

    See every campaign at a glance: firms at each stage, drafts waiting for approval, emails sent, replies and AI cost.

    Read only
    threadrail campaign_stats.list
  • Campaign report campaign_reports.get

    Read one campaign's results: from sent to won, cost per interested reply, the angles that worked and how far it can run on its own.

    Read only
    threadrail campaign_reports.get --campaign_id <campaign_id>
  • Brand report brand_reports.get

    Read one brand's results across all its campaigns: from sent to won, cost per interested reply and the angles that worked.

    Read only
    threadrail brand_reports.get --brand_slug <brand_slug>
  • Autonomy status autonomy.get

    See how much a campaign can do on its own, what it needs to earn more, and what is holding it back.

    Read only
    threadrail autonomy.get --campaign_id <campaign_id>
  • List open brief proposals brief_proposals.list

    See this week's suggested changes to a campaign's approach, each with its reason. An owner decides them in ThreadRail.

    Read only
    threadrail brief_proposals.list
  • Pipeline health pipeline_runs.list

    See when ThreadRail's daily and weekly jobs last ran.

    Read only
    threadrail pipeline_runs.list
  • Create a campaign campaigns.create

    Start a new campaign for a brand, with its audience, offer and angles. Owners only. Every email still needs a person's approval.

    Makes changes
    threadrail campaigns.create --brand_slug <brand_slug> --name <name> --slug <slug> --audience_key <audience_key> --offer <offer> --angles <angles> --reason_line <reason_line>
  • Enrol firms enrolments.create

    Add up to 50 more firms to a campaign from its audience. Owners only. Each firm passes the opt-out and UK marketing rules checks first.

    Makes changes
    threadrail enrolments.create --campaign_id <campaign_id> --count <count>
  • Stop an enrolment enrolments.cancel

    Stop one firm in a campaign, with a reason. No more emails go to that firm from this campaign.

    Makes changes
    threadrail enrolments.cancel --enrolment_id <enrolment_id> --reason <reason>
  • Stop a campaign's sending campaign_sending.cancel

    Stop a campaign sending straight away and cancel every scheduled email. Owners only. Only a person in ThreadRail can restart it.

    Makes changes
    threadrail campaign_sending.cancel --campaign_id <campaign_id>

Drafts and sending

  • List drafts waiting for approval waiting_drafts.list

    See the emails waiting for your approval, oldest first, including any the checker flagged for a person.

    Read only
    threadrail waiting_drafts.list
  • Write a draft drafts.create

    Write an email for one firm yourself. It is checked and goes to the approval queue; it is never sent from here.

    Makes changes
    threadrail drafts.create --enrolment_id <enrolment_id> --subject <subject> --body <body> --why_line <why_line>
  • Add an opt-out suppressions.create

    Stop all email to an address, domain, phone number or company, everywhere and for good.

    Makes changes
    threadrail suppressions.create --kind <kind> --value <value>
  • Reject a waiting draft draft_rejections.create

    Reject a waiting email and say why. ThreadRail can write a new one from your reason, or stop that firm.

    Makes changes
    threadrail draft_rejections.create --draft_id <draft_id> --reason <reason>
  • Suggest a reply on a thread reply_suggestions.create

    Ask ThreadRail's AI to draft a reply from your instruction. It waits in the reply box for a person to edit and send.

    Makes changes
    threadrail reply_suggestions.create --thread_id <thread_id> --channel <channel> --instruction <instruction>
  • Report a wrong fact fact_reports.create

    Report a wrong fact in an email that was sent. The campaign drops back to full approval while the fact is checked.

    Makes changes
    threadrail fact_reports.create --message_id <message_id> --note <note>
  • Prepare a draft to send sends.prepare

    Show the exact email before it goes, so you can approve it.

    Makes changes
    threadrail sends.prepare --draft_id <draft_id>
  • Send a prepared draft sends.commit

    Send an email you prepared. It goes out in the next sending window if the campaign allows it, or waits for a person's approval.

    Makes changes
    threadrail sends.commit --token <token>
  • Approve a prepared draft approvals.commit

    Approve an email you prepared. At a campaign's first level, emails are approved in ThreadRail instead.

    Makes changes
    threadrail approvals.commit --token <token>

Deals

  • Deals board deals.list

    See your deals, open and closed, with their stage, value and next step, for everything or one campaign or brand.

    Read only
    threadrail deals.list
  • Set a deal's next step deals.next_step.update

    Set a deal's next step, with an optional due date.

    Makes changes
    threadrail deals.next_step.update --deal_id <deal_id> --text <text>
  • Move a deal deals.stage.update

    Move a deal to another stage, or mark it won or lost.

    Makes changes
    threadrail deals.stage.update --deal_id <deal_id> --stage <stage>
  • Set a deal's value deals.value.update

    Set a deal's value in pounds.

    Makes changes
    threadrail deals.value.update --deal_id <deal_id> --value_gbp <value_gbp>

Brands, mailboxes and channels

  • Sender health sender_health.list

    Check each sending mailbox: warm-up progress, daily limit, emails sent today, any pauses and why, and its email setup.

    Read only
    threadrail sender_health.list
  • List brands brands.list

    See your brands, with their voice, sending details, footer and channels.

    Read only
    threadrail brands.list
  • Create a brand brands.create

    Create a brand. Owners only.

    Makes changes
    threadrail brands.create --name <name> --slug <slug>
  • Update a brand brands.update

    Change a brand's voice, banned phrases, legal footer or privacy link. Owners only.

    Makes changes
    threadrail brands.update --brand_id <brand_id>
  • List channels channels.list

    See your mailboxes, aliases and WhatsApp numbers, with their status and whether they are paused.

    Read only
    threadrail channels.list
  • Create a mailbox password link mailboxes.create

    Add a mailbox and get a secure page where you type its password. Owners only.

    Makes changes
    threadrail mailboxes.create --brand_id <brand_id> --address <address>
  • Test a mailbox mailbox_tests.create

    Test that a mailbox connects. Owners only.

    Makes changes
    threadrail mailbox_tests.create --mailbox_id <mailbox_id>
  • Create a mailbox alias mailbox_aliases.create

    Add another address on a mailbox's domain. Owners only.

    Makes changes
    threadrail mailbox_aliases.create --mailbox_id <mailbox_id> --address <address>
  • Cancel a mailbox alias mailbox_aliases.cancel

    Retire a mailbox address and keep its mail history. Owners only.

    Makes changes
    threadrail mailbox_aliases.cancel --alias_id <alias_id>
  • Update a channel channels.update

    Change how a mailbox or WhatsApp number is handled, or pause or resume it. Owners only.

    Makes changes
    threadrail channels.update --kind <kind> --endpoint_id <endpoint_id>
  • Request a WhatsApp number whatsapp_number_requests.create

    Ask for a WhatsApp number to be connected. Owners only.

    Makes changes
    threadrail whatsapp_number_requests.create --brand_id <brand_id> --number <number>
  • Start sender warm-up warmups.create

    Start warming up a new email sender, once its email setup and warm-up contacts are ready. Owners only.

    Makes changes
    threadrail warmups.create --sender_id <sender_id>
  • Add warm-up contact warmup_contacts.create

    Add a person who agreed to receive warm-up emails. Owners only.

    Makes changes
    threadrail warmup_contacts.create --brand_id <brand_id> --name <name> --email <email> --relationship <relationship>
  • Remove warm-up contact warmup_contacts.cancel

    Stop sending warm-up emails to a person. Owners only.

    Makes changes
    threadrail warmup_contacts.cancel --contact_id <contact_id>
  • Resume paused sending sending_pauses.cancel

    Resume a paused sender at a lower daily limit, as the app does. Owners only.

    Makes changes
    threadrail sending_pauses.cancel --kind <kind> --id <id>
  • List signatures signatures.list

    See the email signatures in your workspace.

    Read only
    threadrail signatures.list
  • Save new signature signatures.create

    Save an email signature for a person and brand, or for one mailbox address.

    Makes changes
    threadrail signatures.create --brand_id <brand_id> --html <html>
  • Update signature signatures.update

    Change an email signature.

    Makes changes
    threadrail signatures.update --signature_id <signature_id> --html <html>
  • Remove signature signatures.cancel

    Remove an email signature. Members can remove their own; owners can remove anyone's.

    Makes changes
    threadrail signatures.cancel --signature_id <signature_id>
  • List snippets snippets.list

    See your saved reply snippets.

    Read only
    threadrail snippets.list
  • Create snippet snippets.create

    Save reply text you use often, for one brand or the whole workspace.

    Makes changes
    threadrail snippets.create --name <name> --html <html>
  • Update snippet snippets.update

    Change a saved snippet. Its author or an owner can change it.

    Makes changes
    threadrail snippets.update --snippet_id <snippet_id> --name <name> --html <html>
  • Remove snippet snippets.cancel

    Remove a saved snippet. Its author or an owner can remove it.

    Makes changes
    threadrail snippets.cancel --snippet_id <snippet_id>

Support and team

  • Support overview support_overview.get

    See how support is set up for each brand: automatic answers, help articles, and its mailboxes and WhatsApp numbers.

    Read only
    threadrail support_overview.get
  • Sign-up sources signup_sources.list

    Check that sign-ups from your products are reaching ThreadRail, and how many matched a contact in the last 30 days.

    Read only
    threadrail signup_sources.list
  • List help articles help_articles.list

    See your approved help articles.

    Read only
    threadrail help_articles.list
  • Create help article help_articles.create

    Add an approved help article with its source. Owners only.

    Makes changes
    threadrail help_articles.create --brand_id <brand_id> --title <title> --body <body> --source_url <source_url>
  • Update help article help_articles.update

    Change an approved help article. Owners only.

    Makes changes
    threadrail help_articles.update --article_id <article_id> --title <title> --body <body> --source_url <source_url>
  • Set automatic support answers support_auto.update

    Turn automatic support answers on or off for a brand. Owners only; turning them on needs 20 good suggestions in a row first.

    Makes changes
    threadrail support_auto.update --brand_id <brand_id> --enabled <enabled>
  • List workspace members members.list

    See the people in your workspace.

    Read only
    threadrail members.list
  • Add workspace member members.create

    Add someone who already uses ThreadRail to your workspace, by email. Owners only.

    Makes changes
    threadrail members.create --email <email>
  • Remove workspace member members.cancel

    Remove someone from your workspace and end their connections. Owners only; the last owner stays.

    Makes changes
    threadrail members.cancel --user_id <user_id>

Examples

  • See every campaign at a glance

    threadrail campaign_stats.list
  • See the replies waiting for you, most urgent first

    threadrail needs_you.list
  • Read a campaign's results for the last 7 days

    threadrail campaign_reports.get --campaign_id <id> --days 7
  • Set a deal's next step

    threadrail deals.next_step.update --deal_id <id> --text "Send the onboarding guide" --on 2026-12-01
  • Show an email, then approve it

    threadrail sends.prepare --draft_id <id>
  • Count what needs you, in a script

    threadrail needs_you.list --json

Scripts and automation

  • Add --json to any command for output a script can read.
  • The exit code is 0 on success and 1 on any error. Errors are one line on stderr, or JSON with --json.
  • On a server or in CI, set RAJOKA_CONNECT_TOKEN to a Rajoka Connect machine token. It is used instead of a person's sign-in, and --access-token wins over both.

How it stays safe

  • Sign in with Rajoka ID and two-step sign-in. threadrail never sees your password.
  • Your sign-in is kept only in your system keychain, never in a file. threadrail logout removes it from this computer.
  • You choose the workspace and level when you approve the connection. Remove it at any time on the Connections screen in ThreadRail, and the CLI stops working on every computer.
  • Every command runs as you, with your role in ThreadRail.
  • Text from your records is shown as data, never as terminal instructions.

Troubleshooting

command not found: threadrail
Install it with -g: npm install -g @rajoka/threadrail.
Unsupported engine, or a syntax error when it starts
Update Node to 24 or later.
Run threadrail login
Your sign-in has ended or was not accepted. Run threadrail login again.
A message with an Open: link
Open the link, finish the step there, such as approving the connection, then run the command again.
Turn on two-step sign-in
Turn it on for your Rajoka ID, then run threadrail login again.
needs the system keychain
On a machine without one, such as a server, use RAJOKA_CONNECT_TOKEN.

Manage your connection

You can see or remove your command line connection in ThreadRail.

Open connections in ThreadRail