{"id":13680232,"url":"https://github.com/Tatamo/atcoder-cli","last_synced_at":"2025-04-29T23:30:52.984Z","repository":{"id":39660485,"uuid":"152963694","full_name":"Tatamo/atcoder-cli","owner":"Tatamo","description":"AtCoder command line tools","archived":false,"fork":false,"pushed_at":"2023-03-02T10:40:22.000Z","size":2542,"stargazers_count":594,"open_issues_count":18,"forks_count":23,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-04-19T21:25:57.572Z","etag":null,"topics":["atcoder","cli","competitive-programming","unofficial"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/atcoder-cli","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tatamo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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}},"created_at":"2018-10-14T10:43:30.000Z","updated_at":"2025-04-19T05:51:49.000Z","dependencies_parsed_at":"2024-01-14T15:23:51.417Z","dependency_job_id":"b83d5d27-68dd-44e9-ae49-515e682dc180","html_url":"https://github.com/Tatamo/atcoder-cli","commit_stats":{"total_commits":311,"total_committers":5,"mean_commits":62.2,"dds":"0.14147909967845662","last_synced_commit":"f385e71ba270716f5a94e3ed9bd23a24f78799d0"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatamo%2Fatcoder-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatamo%2Fatcoder-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatamo%2Fatcoder-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatamo%2Fatcoder-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tatamo","download_url":"https://codeload.github.com/Tatamo/atcoder-cli/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599785,"owners_count":21615580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["atcoder","cli","competitive-programming","unofficial"],"created_at":"2024-08-02T13:01:14.517Z","updated_at":"2025-04-29T23:30:49.369Z","avatar_url":"https://github.com/Tatamo.png","language":"TypeScript","readme":"# atcoder-cli\n[AtCoder](https://atcoder.jp/) command line tools\n- get contest information\n- create a project directory for contests\n  - auto provisioning with custom templates\n- linkage with [online-judge-tools](https://github.com/kmyk/online-judge-tools)\n    - submit your code without specified URL\n    - auto downloading of sample inputs/outputs\n\n[解説記事(日本語)](http://tatamo.81.la/blog/2018/12/07/atcoder-cli/)\n\n## Requirements\nnode.js  \n[online-judge-tools](https://github.com/kmyk/online-judge-tools) (optional, but recommended)\n\n## Install\n```sh\n$ npm install -g atcoder-cli\n```\n\n## Usage\n```sh\n$ acc login # login your atcoder account\n$ acc session # check login status\n$ # your login session will be saved to a local file, but your password won't be saved\n$ # to delete the session file, use `acc logout`\n$ acc new abc001 # \"abc001/\" directory will be created\n$ cd abc001/\n$ acc contest # show the contest information\n$ acc tasks # show task list\n$ acc add\n$ cd a/\n$ vim main.cpp # write your solution\n$ acc submit main.cpp # to use submit function, you have to install online-judge-tools\n```\n\nTo get detailed information, use\n```sh\n$ acc [COMMAND] -h\n```\n\n## Config\n```sh\n$ acc config -h\n$ acc config # show all global options\n$ acc config \u003ckey\u003e \u003cvalue\u003e # set option\n$ cd `acc config-dir`\n$ cat config.json # global config file\n```\n## Provisioning Templates\nWith using custom templates, you can automatically prepare your template program code or build environment.\n\nWhen you create new task directories, atcoder-cli can do:\n- place the scaffold program file\n- copy static files\n- exec shell command\n\nshow available templates:\n```sh\n$ acc templates\n```\n\nuse the template:\n```sh\n$ acc new|add --template \u003cyour-template-name\u003e\n```\n\nOr you can set default template:\n```sh\n$ acc config default-template \u003cyour-template-name\u003e\n```\n\n### Create a new template\n```sh\n$ cd `acc config-dir`\n$ mkdir \u003cyour-template-name\u003e\n$ cd \u003cyour-template-name\u003e\n$ vim template.json # write your template settings\n```\n\n### Options in template.json\n```json\n{\n  \"task\": {\n    \"program\": [\"main.cpp\", [\"foo.cpp\", \"{TaskID}.cpp\"]],\n    \"submit\": \"main.cpp\",\n    \"static\": [\"foo\", [\"bar\",\"bar_{TaskLabel}\"]],\n    \"testdir\": \"tests_{TaskID}\",\n    \"cmd\": \"echo Hi!\"\n  },\n  \"contest\": {\n    \"static\": [[\"gitignore\", \".gitignore\"]],\n    \"cmd\": \"echo Ho!\"\n  }\n}\n```\n\n#### `\"task\"` (required)\nexecuted for each tasks.\n\n##### `\"program\"` (required)\n```ts\n\"program\": (string | [string, string])[]\n```\n\nYour main program(s).\nPlace main.cpp in the same directory of template.json, and write\n```\n  \"program\": [\"main.cpp\"]\n```\nthen the program file will be copied to the task directory.\n\nYou can rename the file with format strings:\n```\n  \"program\": [[\"main.cpp\", \"{TaskId}.cpp\"]] \n```\nThe file name of the program file will be \"A.cpp\" if the task is problem A.\n\nTo get detailed information about format strings, use `acc format -h`.\n\n##### `\"submit\"` (required)\n```ts\n  \"submit\": string\n```\n\nThe file name to submit.\nIt enables to omit the filename argument to submit file, so you can run `acc submit` instead of `acc submit \u003cfilename\u003e`.\n\nFormat strings are supported.\n\n##### `\"static\"` (optional)\n```ts\n\"static\": (string | [string, string])[]\n```\n\nStatic assets.\nThe difference between `\"program\"` and `\"static\"` is:\n  - `\"program\"` files won't be overwrited when using `acc add --force`.\n  - `\"static\"` files will be overwrited when using `acc add --force`.\n\n##### `\"testdir\"` (optional)\n```ts\n  \"testdir\": string\n```\n\nThe name of the directory that sample cases will be downloaded.\nWithout this, the directory name will be the value of `acc config default-test-dirname-format`.\n\nFormat strings are supported.\n\n##### `\"cmd\"` (optional)\n```ts\n  \"cmd\": string\n```\nAfter copying files and downloading sample cases, the specified command will be executed.\n\nThe working directory is the task directory.\n\nParameters are given as enviromental variables:  \n`$TEMPLATE_DIR`, `$TASK_DIR`, `$TASK_ID`, `$TASK_INDEX`, `$CONTEST_DIR` and `$CONTEST_ID`\n\n#### `contest` (optional)\nexecuted only once when `acc new` command runs.\n\n##### `\"static\"` (optional)\nSame as `tasks.static`.\n\n##### `\"cmd\"` (optional)\nSame as `tasks.cmd`, but `$TASK_*` variables do not exist.\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTatamo%2Fatcoder-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTatamo%2Fatcoder-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTatamo%2Fatcoder-cli/lists"}