Skip to content

Other CLI commands

Besides articles, the CLI sets up your projects and templates. It also shows your voices, outlets and credits.

All docs pages

Articles are the main thing you do with the CLI, and they have their own page. The commands on this page set up everything around them. A project tells Unspar about your site. A template decides how an article is built, and a voice sets how it sounds. An outlet is where the article goes, and credits are what it costs.

Each group works on the same data as the web app. What you change here shows up in the app, and the other way around.

Set up your projects

A project is one website in Unspar. It holds the site context, a few plain sentences about who the site is for. It also holds the defaults that each new article starts from, like the language and the template. You can see your projects under Projects in the web app. Projects and site context explains how to write a good site context.

Command What it does
unspar projects list Lists your projects with their IDs. --status and --search filter.
unspar projects show <project-id> Shows one project with its site context and defaults.
unspar projects create --name <name> Creates a project. This is free.
unspar projects update <project-id> Changes the options you give and leaves the rest as it is.
unspar projects visual-identity ... Sets the look of the project’s images (see below).

This creates a project and then sets its site context from a file:

unspar projects create --name "DNS guides" --url https://www.example.com --language en-US --timezone Europe/Berlin
unspar projects update <project-id> --context-file site.md

site.md holds two to four plain sentences. Writing style doesn’t go here, because the template and the voice take care of it.

Guides for people who run their own small web server.
Readers know the Linux command line but are new to networking.
Examples use Debian and Ubuntu.

create and update take the same options:

Option What it sets
--name, --description, --url The project’s name, description and address.
--language The language of new articles, as a tag like en-US or de-DE.
--timezone The time zone for publishing times, like Europe/Berlin.
--status active, paused or archived. Articles only start in an active project.
--context "<text>" The site context. --context "" clears it.
--context-file <file> The site context from a file. - reads it from stdin.
--address-form auto, formal or informal. This matters in languages with a formal “you”, like German.
--target-word-count The default length: 1000, 2000, 3000, 5000, 7500 or 10000 words. 0 lets the length follow the topic.
--internal-links-enabled=false Turns off links to related articles that Unspar already published. They are on by default.
--default-template <id> The template for new articles, from unspar templates list. "" clears it.
--default-voice <id> The voice for new articles, from unspar voices list. "" clears it.
--default-outlet <id> The outlet for new articles, from unspar outlets list. "" clears it.
--dry-run Shows what the CLI would send, without sending it.

The length affects the price. Setting it to 3,000 words makes an article at least In-depth, for 4 credits. Setting it to 7,500 words makes it at least a Report, for 15 credits. A template that sets its own length or form of address overrides the project. See Credits and prices.

update needs at least one change. Instead of flags, you can also pass the change as JSON with --body or --body-file, though not both in one command. A login limited to specific projects can’t create new ones.

Change the template of Project Auto

Project Auto writes a set number of articles a day for a project. You turn it on in the web app (see Project Auto and ideas). From the CLI, you can change the template it uses while Auto is on and running.

unspar projects update <project-id> --auto-template <template-id>

If the template generates images, Unspar returns an error asking you to accept their cost. Run the command again with --confirm-media-spend. You can’t combine --auto-template with other changes in the same command.

Set the look of the project’s images

A visual identity gives all of a project’s images one consistent look. New illustrations follow it, and new photos do too if you choose a photo style. You pick it once from three options, so you never have to describe styles or colors in a brief. See Images.

  1. List the image styles and pick one.
   unspar api get /image-presets
  1. Get three options in that style. --notes adds up to 300 characters, and --palette takes colors like #1E3A5F,#F2F2F2. --wait waits up to four minutes for the options.
   unspar projects visual-identity generate <project-id> --style <preset-id> --wait
  1. Look at the options. Each one has a link to a sample image. The output also shows the round’s ID.
   unspar projects visual-identity show <project-id>
  1. Pick one of the three.
   unspar projects visual-identity approve <project-id> --round <round-id> --candidate 2

Rounds of options are free. Each project gets up to 5 rounds a day and each team up to 15, counted per UTC day. The images in articles still cost 1 credit each. Later, visual-identity update changes only the colors or the notes. visual-identity clear turns the look off for future images, and images that exist stay as they are.

Delete a project

The CLI has no command that deletes a project. To stop new articles, set --status paused or --status archived. To delete a project for good, use the api command. It doesn’t ask first, and you can’t undo it. Unspar deletes the project’s articles with it. Posts that are already on your site stay there.

unspar api delete /projects/<project-id>

Pick and adapt templates

A template is the set of rules for one kind of text, like a guide or a comparison. It decides how Unspar researches and builds the article. Built-in templates have IDs like template:builtin:general_guide and can’t be edited. Your own copies have 26-character IDs. unspar templates list shows them all, and Choosing a template describes the built-ins.

Command What it does
unspar templates list Lists the built-ins and your copies. --status archived or all shows archived ones.
unspar templates show <template-id> Shows one template with its settings.
unspar templates recommend --topic "<topic>" Recommends templates for a topic. Free, and creates nothing.
unspar templates duplicate <template-id> --name "<name>" Copies a template so that you can change it.
unspar templates update <template-id> --body-file <file> Changes your copy.
unspar templates compare <template-id> Shows what your copy changed compared with its source.
unspar templates archive <template-id> --revision <revision> Takes a copy out of the lists. unarchive brings it back.

Each template has a review status. Tested means it was reviewed for the use case it names. Experimental means it hasn’t passed that review yet.

Find the template for a topic

When an article is a different kind of text than usual, ask for a recommendation before you choose.

unspar templates recommend --topic "Notion vs Confluence" --project <project-id>

With --project, the project’s default template comes back as preferred. You also get a recommended template and a few alternatives, each with a reason. The Expert Reply template only shows up for a journalist’s request, so paste the whole request with --brief.

To use a template for one article, pass its ID to unspar articles create --content-template. To use it for all new articles, set it with unspar projects update <project-id> --default-template.

Adapt a template

Built-in templates come with tested writing instructions. When none of them fits, copy the closest one and change only what you need. The CLI has no command to write a template from scratch.

  1. Copy the template. The output shows the copy’s ID.
   unspar templates duplicate template:builtin:general_guide --name "Short guide"
  1. Look at the copy. show --json prints its settings and its revision, a number that goes up with each change.
   unspar templates show <template-id> --json
  1. Save only the change in a file, with the revision and a one-line reason.
{
  "revision": 1,
  "reason": "Short headings for readers on phones",
  "configuration": {
    "style_guardrails": {
      "heading_guidance": "Short headings"
    }
  }
}
  1. Send the change.
   unspar templates update <template-id> --body-file change.json
  1. Check what changed compared with the source.
   unspar templates compare <template-id>

Settings you leave out stay as they are. Nested settings merge with the saved ones, while lists are replaced as a whole. If someone changed the template since you read it, Unspar answers with a conflict. Read it again and apply your change to the new revision. Later changes to the built-in never change your copy by themselves.

Copying and changing templates costs no credits. It needs a login that covers all projects.

An archived copy still works for projects that have it as their default, and for Project Auto. To delete a copy for good, use unspar api delete /templates/<template-id>. Unspar refuses while Project Auto writes with it.

Look up voices

A voice sets the tone of an article, like a friendly explainer. Built-in voices have IDs like voice:builtin:friendly_explainer. The CLI only lists and shows voices. You create your own under Voices, see Voices.

Command What it does
unspar voices list Lists the built-in voices and your own.
unspar voices show <voice-id> Shows one voice.

Pass a voice to one article with unspar articles create --voice, or make it the project’s default with unspar projects update <project-id> --default-voice.

Check your outlets

An outlet is a place Unspar sends finished articles to, like your WordPress site or a GitHub repository. You connect most outlets in the web app under Outlets. The CLI lists them, so you can pick one when you publish. See Outlets and publishing.

Command What it does
unspar outlets list Lists your outlets with their IDs.
unspar outlets show <outlet-id> Shows one outlet.

ready says whether an outlet has all the settings it needs. An outlet with ready set to false refuses to publish until you complete it in the web app. ready doesn’t test the connection. This does:

unspar api post /outlets/<outlet-id>/test --jq .connection.status

It prints "success" or "failed". The command itself succeeds in both cases, so check the returned value. The list never shows passwords or tokens.

Connect a GitHub repository or a webhook

A GitHub outlet writes each published article as a Markdown file into a repository. A webhook outlet sends each published article as JSON to an address on your server. Both can be created from the terminal with unspar api post /outlets. This requires a login that covers all projects, because outlets belong to the whole team.

Put the settings into a file and keep that file out of your repository, because it holds the token. For GitHub, the token needs read and write access to the repository’s contents, and the branch has to exist.

{
  "name": "Website repository",
  "type": "github",
  "connection": {
    "owner": "example-org",
    "repo": "website",
    "branch": "main",
    "directory": "src/content/blog"
  },
  "credentials": { "api_key": "github_pat_..." }
}

For a webhook, connection holds api_url, a public HTTPS address. credentials.api_key is the signing secret your server also knows.

unspar api post /outlets --body-file github-outlet.json --secret-field api_key

--secret-field api_key hides the token in previews and error messages. Both outlet types only create new items. They never edit or delete what they already sent. GitHub and Webhooks have the details.

See your credits

Credits belong to the team as a whole rather than to a single project. A login limited to specific projects still sees the whole team’s balance. You can see the same numbers under Credits.

unspar credits balance
unspar credits transactions --sort -created_at --limit 20

balance shows the balance and your plan. transactions lists each entry with its amount and a description. These options narrow the history down:

Option What it does
--type credit_added, credit_spent, debt, adjustment or other.
--since, --until A date and time with a time zone, like 2026-11-01T00:00:00Z. A date on its own is refused.
--sort -created_at for the newest first, created_at for the oldest.

This adds up the credits spent in November. Spent credits are negative amounts.

unspar credits transactions --type credit_spent \
  --since 2026-11-01T00:00:00Z --until 2026-11-30T23:59:59Z \
  --all --jq '[.[].amount] | add'

In scripts, rely on type. description is text for people, and its wording can change.

Commands for the CLI itself

A few commands work on the CLI itself rather than on your team’s data.

Command What it does
unspar doctor Checks your settings, your login and the connection to Unspar. It changes nothing.
unspar update Installs the newest version. --check only tells you whether there is one.
unspar version Prints the version of the CLI.
unspar completion <shell> Prints a tab completion script for bash, zsh, fish or powershell.
unspar agent-guide Prints a short guide for AI agents that use Unspar.
unspar agent-guide --write <file> Adds that guide to a file in the current folder, like AGENTS.md or CLAUDE.md. A second run replaces it in place.

To turn on tab completion in the current zsh session, run this:

source <(unspar completion zsh)

Claude Code reads AGENTS.md only in folders without a CLAUDE.md. If your repository has a CLAUDE.md, write the guide there with unspar agent-guide --write CLAUDE.md.

Last updated 25 November 2026. This page as Markdown: commands.md

Try Unspar for free

Create a project, give it a topic and read the article before anything goes live.