{"id":24540492,"url":"https://github.com/typedb/typedb-console","last_synced_at":"2026-02-19T17:00:32.867Z","repository":{"id":39630029,"uuid":"207264512","full_name":"typedb/typedb-console","owner":"typedb","description":"TypeDB Console: CLI for TypeDB and TypeDB Cluster","archived":false,"fork":false,"pushed_at":"2026-02-18T17:47:32.000Z","size":1078,"stargazers_count":10,"open_issues_count":44,"forks_count":18,"subscribers_count":7,"default_branch":"master","last_synced_at":"2026-02-18T20:58:03.377Z","etag":null,"topics":["cli","console","typedb","typeql"],"latest_commit_sha":null,"homepage":"https://typedb.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/typedb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-09T08:45:43.000Z","updated_at":"2026-02-04T21:25:51.000Z","dependencies_parsed_at":"2023-10-11T10:47:36.017Z","dependency_job_id":"c7d719f7-128a-4555-9821-1d865979370e","html_url":"https://github.com/typedb/typedb-console","commit_stats":null,"previous_names":["typedb/typedb-console","vaticle/typedb-console"],"tags_count":84,"template":false,"template_full_name":null,"purl":"pkg:github/typedb/typedb-console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typedb%2Ftypedb-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typedb%2Ftypedb-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typedb%2Ftypedb-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typedb%2Ftypedb-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typedb","download_url":"https://codeload.github.com/typedb/typedb-console/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typedb%2Ftypedb-console/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29623545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","console","typedb","typeql"],"created_at":"2025-01-22T18:09:50.688Z","updated_at":"2026-02-19T17:00:32.176Z","avatar_url":"https://github.com/typedb.png","language":"Rust","readme":"# TypeDB Console\n\n[![Factory](https://factory.vaticle.com/api/status/typedb/typedb-console/badge.svg)](https://factory.vaticle.com/typedb/typedb-console)\n[![GitHub release](https://img.shields.io/github/release/typedb/typedb-console.svg)](https://github.com/typedb/typedb-console/releases/latest)\n[![Discord](https://img.shields.io/discord/665254494820368395?color=7389D8\u0026label=chat\u0026logo=discord\u0026logoColor=ffffff)](https://typedb.com/discord)\n[![Discussion Forum](https://img.shields.io/discourse/https/forum.typedb.com/topics.svg)](https://forum.typedb.com)\n[![Stack Overflow](https://img.shields.io/badge/stackoverflow-typedb-796de3.svg)](https://stackoverflow.com/questions/tagged/typedb)\n[![Stack Overflow](https://img.shields.io/badge/stackoverflow-typeql-3dce8c.svg)](https://stackoverflow.com/questions/tagged/typeql)\n\n## Running TypeDB Console \n\nGo to the directory where you have your `typedb-all` or `typedb-console` distribution unarchived, and run `./typedb console`\n```bash\ncd \u003cyour_typedb_console_dir\u003e/\n./typedb console\n```\n\nTo build and run from Cargo, use:\n```bash\ncargo run -- --username=\u003cusername\u003e --address=\u003caddress\u003e\n```\n\nOr to use bazel, use:\n```bash\nbazel run //:console-native -- --username=\u003cusername\u003e --address=\u003caddress\u003e\n```\n\nTypeDB console binaries are platform-specific, so cannot be moved across platforms - please use the correct\nplatform-specific distribution.\n\n## Command line arguments\n\nYou can provide several command arguments when running console in the terminal.\n\n- `--username=\u003cusername\u003e` : TypeDB server username to log in with (mandatory).\n- `--address=\u003caddress\u003e` : TypeDB server address to which the console will connect to (mandatory). Ensure it is prefixed with `https://` when using TLS.\n- `--script=\u003cpath\u003e` : Run commands in the script file in non-interactive mode.\n- `--command=\u003ccommand1\u003e --command=\u003ccommand2\u003e ...` : Run commands in non-interactive mode.\n- `-V, --version` : Print version information and exit.\n- `-h, --help` : Show help message.\n\nTypeDB Console will by default prompt you for your password in a safe way. If you must,\nyou are still able to pass in the password with `--password=\u003cpassword\u003e`.\n\n**By default, TLS encryption is enabled to ensure passwords are not sent over the network in plaintext**\n\nFor development or local work, you can disable this with:\n\n`--tls-disabled`\n\nFor TypeDB Cloud deployments, there is **no reason to use this setting** as they can only operate with network TLS encryption.\n\nAlternatively, you may securely connect by managing your own certificates for both the client-side and server-side,\nand provide your certificate to the console with:\n`--tls-root-ca=\u003cpath\u003e`\n\nSee documentation at https://typedb.com/docs/manual/configure/encryption for further details.\n\n## Console commands\n\nTypeDB Console provides two levels of interaction: server-level commands and transaction-level commands. \nTo enter the transaction command mode, open a transaction, using a `transaction` command.\n\nConsole offers command completion, accessible with a `tab` keypress. Some non-keyword data, such as database and usernames,\nwill also be autocompleted, while others, such as queries, will not.\n\n### Database-level commands\n\n- `database create \u003cdb\u003e` : Create a database with name `\u003cdb\u003e` on the server.\n  ```\n  \u003e database create my-typedb-database\n  Successfully created database.\n  ```\n- `database list` : List the databases on the server. \n  ```\n  \u003e database list\n  my-typedb-database\n  ```\n- `database delete \u003cdb\u003e` : Delete a database with name `\u003cdb\u003e` on the server.\n  ```\n  \u003e database delete my-typedb-database\n  Successfully deleted database.\n  ```\n- `transaction read|write|schema \u003cdb\u003e` : Start a `read`, `write`, or `schema` transaction to database `\u003cdb\u003e`.\n  ```\n  \u003e transaction schema my-typedb-database\n  my-typedb-database::schema\u003e\n  ```\n  This will then take you to the transaction-level interface, i.e. the second-level REPL.\n\n**IMPORTANT: For TypeDB Console 2.x users, this command has changed order! It used to be `transaction \u003cdb\u003e read|write|schema`**. Now, the `\u003cdb\u003e` and `read|write|schema` order is reversed!\n\n- `clear` : Clear the console\n- `help` : Print help menu\n- `exit` : Exit console\n\n### Transaction-level commands\n\n- `\u003cquery\u003e` : Once you're in the transaction REPL, the terminal immediately accepts a multi-line TypeQL query, and will execute it when you **hit enter twice**.\n  ```\n  my-typedb-database::schema\u003e\u003e define\n                              attribute name, value string;\n                              entity person, owns name;\n  \n  Finished schema query.\n  \u003e\u003e\n  ```\n- `source \u003cfile\u003e` : Run TypeQL queries in a file (_not a general console script_), which you can refer to using relative or absolute path. Queries must be terminated by an empty newline.\n  ```\n  my-typedb-database::schema\u003e source ./schema.tql\n  Successfully executed 1 queries.\n  ```\n- `commit` : Commit the transaction changes and close transaction. For example:\n  ```\n  my-typedb-database::schema\u003e commit\n  Successfully committed transaction.\n  ```\n- `rollback` : Will remove any uncommitted changes you've made in the transaction, while leaving transaction open. For example:\n  ```\n  my-typedb-database::schema\u003e rollback\n  Transaction changes rolled back.\n  ```\n- `close` : Close the transaction without committing changes, and takes you back to the database-level interface, i.e. first-level REPL. For example:\n  ```\n  my-typedb-database::schema\u003e close\n  Transaction closed without committing changes\n  ```\n- `clear` : Clear the console\n- `help` : Print this help menu\n- `exit` : Exit console\n\n### Interactive scripts\n\nIt's possible to paste console scripts directly into any level of REPL:\n\n```\n\u003e\u003e database create test\ntransaction schema test\n    define entity person;\n    \n    commit\ntransaction write test\n    insert $x isa person;\n    \n    commit\ndatabase create test\ntransaction read test\nmatch $x isa person;\n\nclose\n```\n\nThis will produce the following output:\n```\n+ database create test\nSuccessfully created database.\n+ transaction schema test\n++ define entity person;\nFinished schema query.\n++ commit\nSuccessfully committed transaction.\n+ transaction write test\n++ insert $x isa person;\nFinished write query validation and compilation...\nFinished writes. Streaming rows...\n   --------\n    $x | isa person, iid 0x1e00000000000000000000\n   --------\nFinished. Total answers: 1\n++ commit\nSuccessfully committed transaction.\n+ database create test\nSuccessfully created database.\n+ transaction read test\n++ match $x isa person;\nFinished read query validation and compilation...\nStreaming rows...\n   --------\n    $x | isa person, iid 0x1e00000000000000000000\n   --------\nFinished. Total answers: 1\n++ close\nTransaction closed\n```\n\n\n### Non-interactive modes\n\n#### Scripts\n\nWe can define a script file that contains the list of commands to run, then invoke console with `./typedb console --script=\u003cpath\u003e`. \n\nScript files take exactly the same format as scripts pasted directly in the REPL.\nImportantly, this means that the **end of a query is delimited by an empty newline**.\n\nFor example, a script `commands.tqls`\n```\ndatabase create test\ntransaction schema test\n    define entity person;\n    \n    commit\ntransaction write test\n    insert $x isa person;\n    \n    commit\ntransaction read test\n    match $x isa person;\n    \n    close\ndatabase delete test\n```\n\nWill produce the following output:\n```\n./typedb console --username=\"user\" --password=\"password\" --script=commands.tqls     \n+ database create test\nSuccessfully created database.\n+ transaction schema test\n++ define entity person;\nFinished schema query.\n++ commit\nSuccessfully committed transaction.\n+ transaction write test\n++ insert $x isa person;\nFinished write query validation and compilation...\nFinished writes. Streaming rows...\n   --------\n    $x | isa person, iid 0x1e00000000000000000000\n   --------\nFinished. Total answers: 1\n++ commit\nSuccessfully committed transaction.\n+ transaction read test\n++ match $x isa person;\nFinished read query validation and compilation...\nStreaming rows...\n   --------\n    $x | isa person, iid 0x1e00000000000000000000\n   --------\nFinished. Total answers: 1\n++ close\nTransaction closed\n+ database delete test\nSuccessfully deleted database.\n```\n\nThe indentation in the script file are only for visual guide and will be ignored by the console. \n\n#### Commands\n\nInstead of producing a script file, you can also specify ordered commands to run directly from the command line:\n`./typedb console --command=\u003ccommand1\u003e --command=\u003ccommand2\u003e ...`.\n\nThese commands will be executed as full commands, one at a time.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypedb%2Ftypedb-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypedb%2Ftypedb-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypedb%2Ftypedb-console/lists"}