{"id":18545793,"url":"https://github.com/wakatime/tcl-prompt","last_synced_at":"2026-03-19T05:01:39.093Z","repository":{"id":191149696,"uuid":"684023564","full_name":"wakatime/tcl-prompt","owner":"wakatime","description":"Tcl plugin for powerlevel10k style prompt and WakaTime time tracking","archived":false,"fork":false,"pushed_at":"2023-12-04T20:27:13.000Z","size":51,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-25T05:59:55.239Z","etag":null,"topics":["expect","tcl","tk","vitis","vivado","wakatime","xsct"],"latest_commit_sha":null,"homepage":"","language":"Tcl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wakatime.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"patreon":"user?u=83975719","custom":["https://user-images.githubusercontent.com/32936898/199681341-1c5cfa61-4411-4b67-b268-7cd87c5867bb.png","https://user-images.githubusercontent.com/32936898/199681363-1094a0be-85ca-49cf-a410-19b3d7965120.png","https://user-images.githubusercontent.com/32936898/199681368-c34c2be7-e0d8-43ea-8c2c-d3e865da6aeb.png"]}},"created_at":"2023-08-28T09:40:10.000Z","updated_at":"2026-01-07T22:52:26.000Z","dependencies_parsed_at":"2023-08-28T11:30:26.622Z","dependency_job_id":"440a626d-2419-44c9-b687-3404665900c1","html_url":"https://github.com/wakatime/tcl-prompt","commit_stats":null,"previous_names":["freed-wu/tcl-prompt","wakatime/tcl-prompt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wakatime/tcl-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakatime%2Ftcl-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakatime%2Ftcl-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakatime%2Ftcl-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakatime%2Ftcl-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wakatime","download_url":"https://codeload.github.com/wakatime/tcl-prompt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakatime%2Ftcl-prompt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30691511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-19T04:38:48.377Z","status":"ssl_error","status_checked_at":"2026-03-19T04:38:19.675Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["expect","tcl","tk","vitis","vivado","wakatime","xsct"],"created_at":"2024-11-06T20:22:16.463Z","updated_at":"2026-03-19T05:01:39.052Z","avatar_url":"https://github.com/wakatime.png","language":"Tcl","funding_links":["https://patreon.com/user?u=83975719","https://user-images.githubusercontent.com/32936898/199681341-1c5cfa61-4411-4b67-b268-7cd87c5867bb.png","https://user-images.githubusercontent.com/32936898/199681363-1094a0be-85ca-49cf-a410-19b3d7965120.png","https://user-images.githubusercontent.com/32936898/199681368-c34c2be7-e0d8-43ea-8c2c-d3e865da6aeb.png"],"categories":[],"sub_categories":[],"readme":"# tcl-prompt\n\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/wakatime/tcl-prompt/main.svg)](https://results.pre-commit.ci/latest/github/wakatime/tcl-prompt/main)\n\n[![github/downloads](https://shields.io/github/downloads/wakatime/tcl-prompt/total)](https://github.com/wakatime/tcl-prompt/releases)\n[![github/downloads/latest](https://shields.io/github/downloads/wakatime/tcl-prompt/latest/total)](https://github.com/wakatime/tcl-prompt/releases/latest)\n[![github/issues](https://shields.io/github/issues/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/issues)\n[![github/issues-closed](https://shields.io/github/issues-closed/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/issues?q=is%3Aissue+is%3Aclosed)\n[![github/issues-pr](https://shields.io/github/issues-pr/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/pulls)\n[![github/issues-pr-closed](https://shields.io/github/issues-pr-closed/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/pulls?q=is%3Apr+is%3Aclosed)\n[![github/discussions](https://shields.io/github/discussions/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/discussions)\n[![github/milestones](https://shields.io/github/milestones/all/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/milestones)\n[![github/forks](https://shields.io/github/forks/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/network/members)\n[![github/stars](https://shields.io/github/stars/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/stargazers)\n[![github/watchers](https://shields.io/github/watchers/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/watchers)\n[![github/contributors](https://shields.io/github/contributors/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/graphs/contributors)\n[![github/commit-activity](https://shields.io/github/commit-activity/w/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/graphs/commit-activity)\n[![github/last-commit](https://shields.io/github/last-commit/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/commits)\n[![github/release-date](https://shields.io/github/release-date/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/releases/latest)\n\n[![github/license](https://shields.io/github/license/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt/blob/main/LICENSE)\n[![github/languages](https://shields.io/github/languages/count/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt)\n[![github/languages/top](https://shields.io/github/languages/top/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt)\n[![github/directory-file-count](https://shields.io/github/directory-file-count/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt)\n[![github/code-size](https://shields.io/github/languages/code-size/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt)\n[![github/repo-size](https://shields.io/github/repo-size/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt)\n[![github/v](https://shields.io/github/v/release/wakatime/tcl-prompt)](https://github.com/wakatime/tcl-prompt)\n\nThis project provides:\n\n- A [powerlevel10k](https://github.com/romkatv/powerlevel10k)-like prompt for\n  [tcl](https://www.tcl.tk)s REPL `tclsh` and [tk](https://www.tcl.tk/)'s REPL\n  `wish`.\n\n![tclsh](https://github.com/wakatime/tcl-prompt/assets/32936898/ff7a8030-2e8b-4f68-8304-1f3a6eda22f0)\n\n![wish](https://github.com/wakatime/tcl-prompt/assets/32936898/627e2dbb-4d12-44a0-a1f9-e3563168a752)\n\n- A [wakatime](https://wakatime.com/) plugin to statistics how much time you\n  write tcl in REPL.\n\n![wakatime](https://github.com/wakatime/tcl-prompt/assets/32936898/42f33e8d-51ef-4225-b6a0-6f7cade60e9b)\n\nBesides tcl's `tclsh` and tk's `wish`, there are many programs written in tcl\nwhich provide their REPLs. This project provides some wrapper scripts to use\nthis plugin for them:\n\n- [`expect`](https://expect.sourceforge.net)\n- [vivado](https://www.xilinx.com/products/design-tools/vivado.html)'s\n  [`vivado -mode tcl`](https://docs.xilinx.com/r/en-US/ug835-vivado-tcl-commands)\n- [vitis](https://www.xilinx.com/products/design-tools/vitis.html)'s\n  [`xsct`](https://docs.xilinx.com/r/en-US/ug1400-vitis-embedded)\n\n![expectp](https://github.com/wakatime/tcl-prompt/assets/32936898/5ceddf38-6b59-45b1-8046-a64286f27189)\n\n![vivadop](https://github.com/wakatime/tcl-prompt/assets/32936898/de90a851-8d62-4e42-a4bd-e8ec402599eb)\n\n![xsctp](https://github.com/wakatime/tcl-prompt/assets/32936898/eed76559-7aee-4854-a94b-5dd9c3782d87)\n\n## Dependencies\n\n- [tclreadline](https://github.com/flightaware/tclreadline): Provide a function\n  `::tclreadline::prompt1`. Every read-eval-print-loop the function will be\n  called and it's result will be used as prompt string.\n- [tcllib](https://core.tcl-lang.org/tcllib): Provide some functions and\n  variables about ANSI colors.\n\n## Install\n\n### [AUR](https://aur.archlinux.org/packages/tcl-prompt)\n\n```sh\nparu -S tcl-prompt-git\n```\n\n### [NUR](https://nur.nix-community.org/repos/freed-wu)\n\n```sh\nnix-env -iA nixos.nur.repos.wakatime.tcl-prompt\n```\n\n## Usage\n\n`~/.tclshrc`:\n\n```tcl\npackage require prompt\n\n::tclreadline::Loop\n```\n\n## Customize\n\nYou can redefined `::tclreadline::prompt1`. This project provides a function\n`::prompt::get_ps1` to generate prompt string.\n\n- `str` is last string, such as `\u003e`, `$`.\n- `format` can be `%s` to add padding white spaces\n- `sep` separate every section of prompt string.\n- `text_or_function` can be a text or function. Such as:\n  - `::prompt::wakatime`: statistic time. Output nothing. Ignore `fg_color` and\n    `bg_color`.\n  - `::prompt::get_icon`: output OS icon.\n  - `::prompt::icon`: OS icon.\n  - `::prompt::get_version`: output tcl version.\n  - `::prompt::version`: tcl version.\n  - `::prompt::get_cwd`: output current working directory. Use `~` to replace `$HOME`.\n  - `::prompt::get_time`: output current time.\n\n```tcl\n# ::prompt::get_ps1 [str] [[format] {fg_color bg_color text_or_function} [sep]] ...\nproc ::tclreadline::prompt1 {} {\n  return [::prompt::get_ps1 ...]\n}\n```\n\nIf you just want to statistic time for wakatime and don't want to customize\nyour prompt string. Just call `::prompt::wakatime` in `::tclreadline::prompt1`:\n\n```tcl\nproc ::tclreadline::prompt1 {} {\n  ::prompt::wakatime\n  return {$}\n  # or other simple prompt string\n}\n```\n\nBy default, It uses the base name of current working directory as your project name.\nYou can remove `--project=%s` from `::prompt::wakatime_cmd` to disable it.\n\nIf there is a git repository, the project name can be achieved by `git`. Else\nuse the base name of current working directory.\n\n\u003c!-- markdownlint-disable MD013 --\u003e\n\n```tcl\nset ::prompt::wakatime_cmd {exec wakatime-cli --write --plugin=repl-tcl-wakatime --entity-type=app --entity=tcl --alternate-language=tcl --project=%s \u0026}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwakatime%2Ftcl-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwakatime%2Ftcl-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwakatime%2Ftcl-prompt/lists"}