{"id":15408347,"url":"https://github.com/yusukebe/t","last_synced_at":"2025-04-19T06:30:19.834Z","repository":{"id":45985996,"uuid":"425712228","full_name":"yusukebe/t","owner":"yusukebe","description":"t is a command line tool for testing on your terminal.","archived":false,"fork":false,"pushed_at":"2021-11-26T08:04:59.000Z","size":38,"stargazers_count":33,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T06:51:16.679Z","etag":null,"topics":["cli","command-line","golang","terminal","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yusukebe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-08T05:43:00.000Z","updated_at":"2023-10-15T22:25:12.000Z","dependencies_parsed_at":"2022-09-26T20:20:51.200Z","dependency_job_id":null,"html_url":"https://github.com/yusukebe/t","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Ft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Ft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Ft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Ft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yusukebe","download_url":"https://codeload.github.com/yusukebe/t/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249627732,"owners_count":21302477,"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","command-line","golang","terminal","testing"],"created_at":"2024-10-01T16:33:36.291Z","updated_at":"2025-04-19T06:30:19.782Z","avatar_url":"https://github.com/yusukebe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# t\n\n`t` is a command line tool for testing on your terminal.\n\n![Terminal](https://user-images.githubusercontent.com/10682/140833442-541da082-8bbd-4637-9bbd-c57440a455a2.png)\n\n## Installation\n\n```\n$ go install github.com/yusukebe/t/cmd/t@latest\n```\n\n## Usage\n\nBasic usage:\n\n```\n$ t hello hello # =\u003e PASS\n```\n\n```\n$ t hello hell # =\u003e FAIL\n```\n\nWith pipe:\n\n```\n$ echo \"hello\" | t hello # =\u003e PASS\n```\n\nEval:\n\n```\n$ t -e 10 \"5*2\" # =\u003e PASS\n```\n\nWith operator\n\n```\n$ t -o \"\u003e\" 10 \"3*2\" # =\u003e PASS\n```\n\nRegular expression:\n\n```\n$ t -m 'hello+' helloooooo # =\u003e PASS\n```\n\nWith [**jq**](https://stedolan.github.io/jq/):\n\n```\n$ echo '{ \"message\": \"hello\" }' | jq -r .message | t hello # =\u003e PASS\n```\n\n```\n$ echo '{ \"number\": 5 }' | jq -r .number | t 10 -o '\u003e' # =\u003e PASS\n```\n\nWith [**rj**](https://github.com/yusukebe/rj), test the status is not error:\n\n```\n$ rj http://example.com/ | jq -r .code | t 500 -o '\u003e'\n```\n\nCircleCI, you can test if the http status is ok on CircleCI with **only** config.yml:\n\n```yaml\nversion: 2.1\njobs:\n  test:\n    parameters:\n      url:\n        type: string\n    docker:\n      - image: cimg/go:1.17.3\n    steps:\n      - run:\n          command: go install github.com/yusukebe/rj/cmd/rj@latest\n      - run:\n          command: go install github.com/yusukebe/t/cmd/t@latest\n      - run:\n          name: Test \u003c\u003c parameters.url \u003e\u003e\n          command: rj \u003c\u003cparameters.url\u003e\u003e | jq '.code' | t 200\nworkflows:\n  test_workflow:\n    jobs:\n      - test:\n          url: https://example.com/\n```\n\nExample repository:\n\n* \u003chttps://github.com/yusukebe/circleci-with-t\u003e\n\n## Author\n\nYusuke Wada \u003chttps://github.com/yusukebe\u003e\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusukebe%2Ft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyusukebe%2Ft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusukebe%2Ft/lists"}