AmoCRM CLI configuration
See and change the amoCRM CLI settings: whose deals sync copies, tasks and calls, variables.
Change how amo works for one account, or for every account on this computer, with one command, and see where each
value came from. You change only the few that matter to you, and the rest keep their defaults.
You decide whose deals sync copies, whether tasks and calls come with them, which stages open a task on your
computer, and what an agent may do. Only you can loosen a permission or change what a sync copies: an agent that
tries is refused.
Settings live in one file, config.json, in the folder amo doctor shows. Each profile has its own part, and
defaults apply to every profile. amo work config show lists each setting and where it came from: the file, a
variable or the default.
On this page:
- See and change a setting
- Permissions
- Which deals sync copies
- Tasks and calls
- A task when a deal enters a stage
- Run records
- Variables
See and change a setting
amo work config show
amo work config set limit 50
amo work config unset limitPermissions
permissions decides what a command may do for this profile: allow, ask, readonly or deny, per permission
key. Over MCP ask does not ask: the write goes ahead. The keys, their built-in levels and how to keep an agent's
writes yours are on Permissions.
amo work config set permissions.deals.close denyWhich deals sync copies
By default sync copies the deals assigned to the signed-in user. An administrator can choose other users instead.
Find their ids with amo work users list, then list them with your own id among them, since the list replaces your
own. The command below uses the example address example.amocrm.ru and the example ids 7001 and 7002. Put your
account's address and the ids you chose in their place:
amo work config set crm.amocrm:example.amocrm.ru.unassigned 7001,7002
amo work syncOnly you set this, since an agent's run is refused it. A user who is not an administrator can choose only
themselves. No setting copies the whole CRM. Any other client is read live with people or organizations.
Tasks and calls
crm.amocrm:<address>.activities is off by default. Turned on, the next sync copies the tasks, comments and calls on
your deals and their clients from the last 90 days. Tasks and what changed shows the
command. Like the choice of deals, only you set it.
A task when a deal enters a stage
crm.amocrm:<address>.stage-tasks names stages, and each deal that moves into one of them opens a task on this
computer, beside your other WireCat tasks. The sync that brings the move opens it, once per move: a task you dismiss
does not come back, and the next entry into the same stage opens a new one. A stage is named by its id, which
amo work stages list --json prints as external_id. The command below uses the example address
example.amocrm.ru. amoCRM's won stage is 142 in every pipeline, so this rule opens a task for a win in any of
them:
amo work config set crm.amocrm:example.amocrm.ru.stage-tasks \
'{"142":{"title":"Send the closing papers","due_days":2}}'
amo work syncamo reads the account's stage history, so a deal that passed through a stage between two syncs still gets that
stage's task. Moves made before the setting was first set open none. Only you set it. To stop,
amo work config unset crm.amocrm:example.amocrm.ru.stage-tasks.
Run records
A command that fails is kept as a run, for amo runs list and runs show. api call and session status --check
are kept when they succeed too, unless record is false (then only failures) or they ran with --no-record.
record_input decides whether a run keeps the words you typed: true (the default), false, or failed for failed
runs only. Secrets are masked either way, as security shows.
Variables
A variable set for one shell or one timer comes before the file:
AMO_PROFILEnames the profile, so a command can leave it out.AMO_READ_ONLY=1refuses every write, whatever the permissions say.AMO_TOKENwithAMO_HOSTsigns in with a long-lived token for that run only, without the keyring.AMO_HOSTis the account's address, andAMO_TOKENwithout it is an error.AMO_AMOCRM_CLIENT_SECRETgives the integration's secret key tosession start --client-id.AMO_CONFIG_DIRandAMO_STATE_DIRmove the settings and the state to other folders. A sign-in made with them is kept apart from your usual one.