Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • Getting Started
  • Administrator documentation
  • Functional characteristics
  • Technology description
  • System requirements
  • Admin Panel
  • Platform installation
  • Platform configuration
  • Platform maintenance
    • Personnel requirements
    • Platform maintenance processes
    • Platform updating
    • Platform service monitoring
    • Backup and recovery
    • Transferring the platform to a new server
    • Creating, deleting, and populating tables for statistics in ClickHouse
    • Usage of the aktool utility
    • Users and directories engaged by the platform
  • Custom channels guide
  • Extra
  • Processing HTTP/HTTPS traffic
  • Administrator API
  • Platform maintenance
  • Usage of the aktool utility
Documentation for version v74

Usage of the aktool utility

Description​

aktool — is a command tool that gives administrators access to various platform management functions through the terminal. With aktool you can perform various operations such as migration, data cleansing, account management, user management, tariffs and other system entities.

To run aktool, start the terminal and, while in the root directory of the platform, execute the command:

./aktool --help

This command will display the available commands and flags.

note

In some cases, upgrading the platform may require you to perform a migration using aktool. This allows you to losslessly update your data to the new platform version. In the description of a release that requires such a migration, we describe in detail which commands can be used to perform it.

List of aktool commands​

For more information about a specific command, type the following:

./aktool [command] --help

CommandDescription
accountsManaging accounts
adminsManaging administrators
akmtaAKMTA management
cleanupCleaning up data for an instance
completionGenerate an autocomplete script for the specified shell
configsConfiguration management
field_migratorMigrating one field to another
helpGet help on any command
history_storageActions with history storage tables
indexesCreating indexes in the platform database
keysManaging keys
migratePerform data migration
nodesManaging nodes
printconfDisplay current values of platform configs
profile_historyManage profile history tables
rabbitmqManage RabbitMQ
resource_system_fieldsAdding system fields to a resource
rolesActions with roles in accounts
smid[SMID] decoder(/en/admin-guide/extra/56257642)
statsManage statistics tables
tariffsManage tariffs
usersManage account users
workflowScenarios management

accounts​

./aktool accounts

The accounts command allows you to interact with accounts

Usage:
aktool accounts [command]

Available Commands:
create Create account
delete Delete account
disable Disable account
enable Enable account
list Show list of accounts
update Update account

Flags:
-h, --help help for accounts

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

admins​

./aktool admins

The accounts command allows you to interact with accounts

Usage:
aktool accounts [command]

Available Commands:
create Create account
delete Delete account
disable Disable account
enable Enable account
list Show list of accounts
update Update account

Flags:
-h, --help help for accounts

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

akmta​

./aktool akmta

The accounts command allows you to interact with accounts

Usage:
aktool accounts [command]

Available Commands:
create Create account
delete Delete account
disable Disable account
enable Enable account
list Show list of accounts
update Update account

Flags:
-h, --help help for accounts

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

cleanup​

./aktool cleanup


The accounts command allows you to interact with accounts

Usage:
aktool accounts [command]

Available Commands:
create Create account
delete Delete account
disable Disable account
enable Enable account
list Show list of accounts
update Update account

Flags:
-h, --help help for accounts

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

completion​

./aktool completion


The accounts command allows you to interact with accounts

Usage:
aktool accounts [command]

Available Commands:
create Create account
delete Delete account
disable Disable account
enable Enable account
list Show list of accounts
update Update account

Flags:
-h, --help help for accounts

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

configs​

./aktool configs


The accounts command allows you to interact with accounts

Usage:
aktool accounts [command]

Available Commands:
create Create account
delete Delete account
disable Disable account
enable Enable account
list Show list of accounts
update Update account

Flags:
-h, --help help for accounts

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

field_migrator​

./aktool field_migrator


Migrates value from old field to new. Now support ONLY phone field
If new field is not exists it will be created.
If new field is exists, value from old field (if it not empty) will override new field

Usage:
aktool field_migrator --accID=int --dbID=int --old_field=string --new_field=string [flags]

Examples:
field_migrator --accID=1 --dbID=2 --old_field=phone --new_field=mbl_phone --config=path/to/main.json

Flags:
--accID int account id where placed database
--dbID int database with field to be migrated
-h, --help help for field_migrator
--new_field string new field to migrate to
--old_field string field name to be migrated

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

help​

./aktool help


Help provides help for any command in the application.
Simply type aktool help [path to command] for full details.

Usage:
aktool help [command] [flags]

Flags:
-h, --help help for help

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

history_storage​

./aktool history_storage


The command allows you to manipulate with history storage tables.

Usage:
aktool history_storage [command]

Available Commands:
init Init history tables

Flags:
-h, --help help for history_storage

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

indexes​

./aktool indexes


The commands allows you to create all platform database indexes

Usage:
aktool indexes [command]

Available Commands:
ensure Ensure indexes [account_id_1,account_id_2,...]

Flags:
-h, --help help for indexes

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

keys​

./aktool keys


The keys command allows you to interact with keys.

Usage:
aktool keys [command]

Available Commands:
import Import a key
list Show all keys
remove Remove a key

Flags:
-h, --help help for keys

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

migrate​

./aktool migrate


Perform some data migration

Usage:
aktool migrate [command]

Available Commands:
importempty Mountiong checkboxes for scheduled imports for account(s)
importfeed Update column for import feed
log Migrate old logs for account(s)
ssdbhbsupp Transfer data from ssdb hbsupp to mongodb
ssdbnotify Transfer 30 days data from ssdb notify to mongodb
webversion Transfer web version to s3like storage

Flags:
-h, --help help for migrate

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

nodes​

./aktool nodes


The nodes command allows you to interact with nodes

Usage:
aktool nodes [command]

Available Commands:
create Create a node
list Show all nodes
remove Remove a node
update Update a node

Flags:
-h, --help help for nodes

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

printconf​

./aktool printconf


The nodes command allows you to interact with nodes

Usage:
aktool nodes [command]

Available Commands:
create Create a node
list Show all nodes
remove Remove a node
update Update a node

Flags:
-h, --help help for nodes

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

Use "aktool nodes [command] --help" for more information about a command.
root@dev-georgy-shanin:/opt/MarketingPlatform# ./aktool printconf --help
Print full config parameters static or dynamic in JSON

Usage:
aktool printconf [type=base|trk] [flags]

Flags:
-h, --help help for printconf

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

profile_history​

./aktool profile_history


The command allows you to interact with profile history tables

Usage:
aktool profile_history [command]

Available Commands:
delete Delete profile history table
fill Fill profile history table
init Init profile history table

Flags:
-h, --help help for profile_history

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

rabbitmq​

./aktool rabbitmq


The command allows you to interact with profile history tables

Usage:
aktool profile_history [command]

Available Commands:
delete Delete profile history table
fill Fill profile history table
init Init profile history table

Flags:
-h, --help help for profile_history

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

resource_system_fields​

./aktool resource_system_fields


Add system fields in resource

Usage:
aktool resource_system_fields [flags]

Flags:
-h, --help help for resource_system_fields

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

roles​

./aktool roles


Actions with roles in accounts

Usage:
aktool roles [command]

Available Commands:
tag_manager_def_role Fix rights for tag_manager object in default roles

Flags:
-h, --help help for roles

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

smid​

./aktool smid


Decode send message id

Usage:
aktool smid [flags]

Flags:
-h, --help help for smid
--json pretty json
--to string convert send message id to ESMID|USMID

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

stats​

./aktool stats


The stats command allows you to interact with stat tables

Usage:
aktool stats [command]

Available Commands:
delete Delete stat table
fill Fill stats table
init Init stat table

Flags:
-h, --help help for stats

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

tariffs​

./aktool tariffs


The tariffs command allows you to interact with tariffs

Usage:
aktool tariffs [command]

Available Commands:
create Create a tariff
list Show all tariffs
remove Remove a tariff.
update Update a tariff

Flags:
-h, --help help for tariffs

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

users​

./aktool users


The users command allows you to interact with account users

Usage:
aktool users [command]

Available Commands:
create Create user
list Show all users
password Change password
remove Remove user
update Update user

Flags:
-h, --help help for users

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

workflow​

./aktool workflow


The workflows command allows you to interact with workflows

Usage:
aktool workflow [command]

Available Commands:
api_nodes_convert convert api_nodes struct

Flags:
-h, --help help for workflow

Global Flags:
--clickhouse_database_name string usage database for clickhouse
--config string config path (default "/opt/akd/config/main.json")
-o, --output string file path to output in the result of the command (default "stdout")
--truncate whether to truncate the file specified by --output

Last updated on Dec 9, 2024
Previous
Creating, deleting, and populating tables for statistics in ClickHouse
Next
Users and directories engaged by the platform
  • Description
  • List of aktool commands
    • accounts
    • admins
    • akmta
    • cleanup
    • completion
    • configs
    • field_migrator
    • help
    • history_storage
    • indexes
    • keys
    • migrate
    • nodes
    • printconf
    • profile_history
    • rabbitmq
    • resource_system_fields
    • roles
    • smid
    • stats
    • tariffs
    • users
    • workflow
© 2015 - 2025 Altcraft, LLC. All rights reserved.