{"id":30718047,"url":"https://github.com/togglebyte/mimic","last_synced_at":"2026-01-20T17:35:04.417Z","repository":{"id":310826753,"uuid":"1041426369","full_name":"togglebyte/mimic","owner":"togglebyte","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-20T13:27:44.000Z","size":0,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-20T13:50:57.499Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/togglebyte.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-20T13:21:20.000Z","updated_at":"2025-08-20T13:27:48.000Z","dependencies_parsed_at":"2025-08-20T14:01:54.744Z","dependency_job_id":null,"html_url":"https://github.com/togglebyte/mimic","commit_stats":null,"previous_names":["togglebyte/mimic"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/togglebyte/mimic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/togglebyte%2Fmimic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/togglebyte%2Fmimic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/togglebyte%2Fmimic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/togglebyte%2Fmimic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/togglebyte","download_url":"https://codeload.github.com/togglebyte/mimic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/togglebyte%2Fmimic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273417767,"owners_count":25101925,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-09-03T09:07:28.011Z","updated_at":"2026-01-20T17:35:04.389Z","avatar_url":"https://github.com/togglebyte.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mimic\n\nScript and playback of text with syntax highlighting.\n\n[Mimic.mp4](https://github.com/user-attachments/assets/28010dd5-edc7-4a32-ac5c-eab1f6a82fd8)\n\n## Example\n\nCreate a `example.echo` file and add the following code:\n```rust\n// example.echo\nload \"src/main.rs\" as main\nextension \"rs\"\nspeed 20\njitter 20\nline_pause 300\n\ntype main\n```\nThen run it with:\n```bash\n$ mimic example.echo\n```\n\n## Syntax\n\nTo add syntax highlighting for a language currently not included:\nCopy the directory into your equivalent of `~/.config/mimic/syntax/\u003clang\u003e`.\n\n## Changing the UI\n\nMimic was made with [Anathema](https://crates.io/crates/anathema) and the\ntemplates are installed by default the first time the program is run.\n\nThe templates are located in the following directories depending on your\nplatform: \n\n* Lin: `~/.config/mimic/templates`\n* Win: `C:\\Users\\\u003cuser\u003e\\AppData\\Roaming\\mimic\\templates`\n* Mac: `/Users/\u003cuser\u003e/Library/Application Support/mimic/templates`\n\n### Example\n\nTo add support for `TOML` copy the `TOML` directory from this repository into `~/.config/mimic/syntax/TOML`.\n\n## Markers\n\nMarkers are used as jump-to points in the code.\nA marker represents a line in the code.\n\nGiven the following code:\n```rust\nfn main() {\n    // @marker\n    println!(\"hello world\");\n}\n```\n\nA `goto marker` instruction would place the cursor at the beginning of the\n`println` macro:\n\n```rust\nfn main() {\n-\u003e    println!(\"hello world\");\n}\n```\n\n## Commands\n\n## Load\n\nLoad a file into memory\n\nSyntax: `load \u003cfilepath\u003e as \u003cident\u003e`\n\n## Delete\n\nDelete selected region and place the cursor at the start of the region.\n\nSyntax: `delete`\n\n## Goto\n\nMove the cursor to a marker if a marker named is given, or to a position\nrelative to the current cursor. The position is given as `row` and `col` offset.\n\nThis means `goto 0 0` keeps the cursor in its current position, \nwhere as `goto 1 0` moves the cursor down one row but keeps it on the same column.\n\nNote that `goto \u003cmarker\u003e` will go to the line where the marker was inserted, \nand first column, regardless of what the column is before the `goto`.\n\nSyntax: `goto \u003cmarker\u003e|\u003crow\u003e \u003ccol\u003e`\n\n## Insert\n\nInsert either a string or content from memory.\n\nSyntax: `insert \u003cmarker\u003e|\u003cstring\u003e` or `insert \u003cstring\u003e`\n\n## Select\n\nSelect the text from the current cursor position given a width and a height.\n\nSyntax: `select \u003cwidth\u003e \u003cheight\u003e`\n            \n## Type\n\nType out the given text in the editor.\n\nSyntax: `type \u003cident\u003e|\u003cstring\u003e`\n\n## TypeNl\n\nType the given text in the editor, unlike the `type` command this will insert a\nnewline character and move the cursor into the new empty line and start the\ntyping.\nThis has a more natural appearance when inserting new lines into existing code.\n\nSyntax: `typenl \u003cident\u003e|\u003cstring\u003e`\nor optionally to remove the final trailing newline character:\nSyntax: `typenl \u003cident\u003e|\u003cstring\u003e nonl`\n\n## Wait / Sleep\n\nWait N seconds before loading the next command.\n`sleep` is an alias for `wait`\n\nSyntax: `wait \u003cseconds\u003e`\n\n## Speed\n\nThis value is given in number of characters per second.\nNote that `line_pause` will be respected between characters if a newline is\nwritten.\n\nSyntax: `speed \u003cinteger\u003e`\nDefault: `20`\n\n## Line pause\n\nSet the speed for which to wait after each newline char is typed\n\nSyntax: `line_pause|linepause \u003cmilliseconds\u003e`\nDefault: `0`\n            \n## Replace\n\nSelects, deletes and replaces the text.\n\nSyntax: `replace \u003cstring\u003e \u003cident\u003e|\u003cstring\u003e`\n\n## Numbers\n\nShow / hide line numbers\n\nSyntax: `numbers \u003ctrue|false\u003e`\nDefault: `false`\n\n## Clear\n\nClear the screen\n\nSyntax: `clear`\n\n## Extension\n\nSet the file extension for the syntax highlighter\n\nSyntax: `extension \"rs\"`\nDefault: `\"txt\"`\n\n## Jitter\n\nPad the frame time with some jitter, making for a more natural appearance of typing.\n\nSyntax: `jitter 25`\nDefault: `20`\n\n## Theme\n\nSet the theme.\nTo see a list of themes run `mimic --themes`.\n\nSyntax: `theme \u003cstring\u003e`\n\n## Audio\n\nLoad a directory with audio files for typing sounds.\n\nEach key will be mapped to an audio file with the same name.\nE.g `a` -\u003e `a.mp3`, `_` -\u003e `_.mp3`\nIf no filename is found it will fallback to `default.mp3`.\nIf `default.mp3` is missing an error will be raised.\n\nSyntax: `audio \u003cfilepath\u003e`\n\n## Popup\n\nShow a popup message\n\nSyntax: `popup \u003cstring\u003e|\u003cident\u003e`\n\n## Close popup\n\nClose a popup message\n\nSyntax: `close_popup|closepopup`\n\n## Find\n\nMove the cursor to a specific word on the same line as the cursor is on.\nA second argument decides the nth instance to find.\n\nSyntax: `find \u003cstring\u003e \u003cint\u003e?`\n\n## Finde\n\nSame as `find` but places the cursor at the end of the result instead of the\nstart.\n\nSyntax: `finde \u003cstring\u003e \u003cint\u003e?`\n\n## Write\n\nWrite the buffer to disk. \nThis will fail if the file already exists.\n\nSyntax: `write \u003cpath\u003e`.\n\n## Command\n\nSimulate typing a command to the command line in the editor\n\nSyntax: `command \u003cstring\u003e|\u003cident\u003e`\n\n## Command clear timeout\n\nClear the command line after N milliseconds\n\nSyntax: `command_clear_timeout \u003cmilliseconds\u003e`\n\n## Set\n\nSet a context value in the template\n\nSyntax: `set \u003cident\u003e \u003cstring\u003e|\u003cbool\u003e|\u003cint\u003e`\n\n**Note** This instruction is only relevant in the context of the template.\n\nThis can be accessed in the template as `state.ctx.\u003cident\u003e`.\n\nFor more information on how this works see [Anathema](https://crates.io/crates/anathema).\n\n## Include\n\nInclude another echo file. \nThis file will have its own context (meaning given `load \"x\" as x` `x` is only relevant in the included echo file).\n\nSyntax: `include \"other.echo\"`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftogglebyte%2Fmimic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftogglebyte%2Fmimic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftogglebyte%2Fmimic/lists"}