{"id":24319540,"url":"https://github.com/ryym/slv","last_synced_at":"2026-02-14T23:06:57.207Z","repository":{"id":57507100,"uuid":"114531970","full_name":"ryym/slv","owner":"ryym","description":"Manage your solutions of programming problems with tests","archived":false,"fork":false,"pushed_at":"2025-03-27T00:11:14.000Z","size":79,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T01:24:15.467Z","etag":null,"topics":["cli","programming-challenges"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryym.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-12-17T11:48:35.000Z","updated_at":"2024-10-20T07:28:27.000Z","dependencies_parsed_at":"2025-03-10T20:41:21.481Z","dependency_job_id":"51523bb8-db0f-430e-a1c3-f45f6c71250f","html_url":"https://github.com/ryym/slv","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryym%2Fslv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryym%2Fslv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryym%2Fslv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryym%2Fslv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryym","download_url":"https://codeload.github.com/ryym/slv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248768341,"owners_count":21158618,"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":["cli","programming-challenges"],"created_at":"2025-01-17T15:33:41.262Z","updated_at":"2026-02-14T23:06:52.162Z","avatar_url":"https://github.com/ryym.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slv\n\n[![circleci](https://circleci.com/gh/ryym/slv.svg?style=svg)](https://circleci.com/gh/ryym/slv)\n[![appveyor](https://ci.appveyor.com/api/projects/status/8e2o0r8bgcfobxmi?svg=true)](https://ci.appveyor.com/project/ryym/slv)\n\nSlv is a command line tool for managing source files of common programming contests, along with test cases.\nSlv can manage any programs that take inputs from stdin and output results to stdout regardless of language. \nYou can:\n\n- define test cases as TOML files\n- write source code in multiple languages\n\nFor example, Slv can be used to manage solution code for\n[AOJ][aoj] and [AtCoder][at-coder] holding online programming contests,\nor for [CodeIQ][code-iq] which provides various programming problems,\nbecause they require a program that uses stdin / stdout.\n\n[aoj]: http://judge.u-aizu.ac.jp/onlinejudge/index.jsp\n[at-coder]: https://atcoder.jp/?lang=en\n[code-iq]: https://codeiq.jp/\n\n## Installation\n\n- [GitHub Releases](https://github.com/ryym/slv/releases)\n- `go get -u github.com/ryym/slv`\n\n## Overview\n\n```\nNAME:\n   slv - Helps you solve programming problems\n\nUSAGE:\n   slv [global options] command [command options] [arguments...]\n\nVERSION:\n   0.2.0\n\nCOMMANDS:\n     new, n   Create new problem directory\n     test, t  Run tests for the specified source code\n     compile  Compile without running\n     run, r   Run the specified source code\n     help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help\n   --version, -v  print the version\n```\n\n## Usage\n\nFirst, create a new problem directory.\n\n```bash\n$ slv new hello\n$ ls hello\nsrc/ test/\n$ cd hello\n```\n\nNext, write your solution and save it in the `src` directory.\nAny file name is fine as long as the extension is correct.\n\n```ruby\n# src/hello.rb\n\nname = gets.chomp\nputs \"hello, #{name}.\"\n```\n\nThen prepare the test cases in the `test` directory.\nAny file name is fine again.\n\n```toml\n# test/test.toml\n\n[[test]]\nin = \"alice\"\nout = \"hello, alice.\"\n\n[[test]]\nin = \"bob\"\nout = \"hello, bob.\"\n```\n\nNow you can test your solution!\n\n```bash\n$ slv test src/hello.rb\ntesting hello.rb...\n..\n\n[OK] All: 2, Passed: 2, Failed: 0 \n```\n\nYou can also specify the solution by the language name or its extension.\n\n```bash\n$ slv test ruby\ntesting hello.rb...\n..\n\n[OK] All: 2, Passed: 2, Failed: 0 \n\n# Or\n\n$ slv test rb\ntesting hello.rb...\n..\n\n[OK] All: 2, Passed: 2, Failed: 0 \n```\n\nWhen your test fails, Slv displays the output diff.\nFor example, add a new test case which expects a different output:\n\n```toml\n# test/test2.toml\n# (You can store any number of test case files in the `test` directory)\n\n[[test]]\nin = \"anonymous\"\nout = \"what your name?\"\n```\n\nThis results in the error like this:\n\n```diff\n$ slv test rb\ntesting hello.rb...\n..F\n\ntest2.toml[0]:\n\n-what your name?\n+hello, anonymous.\n\n\n[FAILED] All: 3, Passed: 2, Failed: 1\n```\n\n## How to write test cases\n\nTest cases are loaded from all TOML files in the `test` directory.\nSee the [sample test cases](sample_cases.toml) as a reference.\n\n## Customize\n\nSlv supports some major languages by default as [TOML config][default-langs].\nYou can use any language with Slv by adding the configuration to `.slv.toml`.\nSlv searches `.slv.toml` from current directory and its all parent directories.\n\n\n[default-langs]: https://github.com/ryym/slv/blob/master/slv/config.go\n\n## Development\n\n```sh\ngit clone https://github.com/ryym/slv\ngo test ./...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryym%2Fslv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryym%2Fslv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryym%2Fslv/lists"}