{"id":26660637,"url":"https://github.com/codevideo/codevideo-virtual-author","last_synced_at":"2026-02-24T07:42:37.885Z","repository":{"id":275266815,"uuid":"925593277","full_name":"codevideo/codevideo-virtual-author","owner":"codevideo","description":"A TypeScript class that represents a virtual author in the CodeVideo ecosystem.","archived":false,"fork":false,"pushed_at":"2025-03-03T09:38:28.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T12:18:49.201Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/codevideo.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":"2025-02-01T08:40:36.000Z","updated_at":"2025-03-03T09:38:31.000Z","dependencies_parsed_at":"2025-02-01T09:37:53.631Z","dependency_job_id":null,"html_url":"https://github.com/codevideo/codevideo-virtual-author","commit_stats":null,"previous_names":["codevideo/codevideo-virtual-author"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codevideo%2Fcodevideo-virtual-author","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codevideo%2Fcodevideo-virtual-author/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codevideo%2Fcodevideo-virtual-author/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codevideo%2Fcodevideo-virtual-author/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codevideo","download_url":"https://codeload.github.com/codevideo/codevideo-virtual-author/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248438514,"owners_count":21103410,"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":[],"created_at":"2025-03-25T12:18:51.989Z","updated_at":"2026-02-24T07:42:37.835Z","avatar_url":"https://github.com/codevideo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @fullstackcraft/codevideo-virtual-author\n\n![NPM Version](https://img.shields.io/npm/v/@fullstackcraftllc/codevideo-virtual-author)\n\n`codevideo-virtual-author` is a TypeScript class that simulates a virtual author that can speak. This lightweight and versatile library is ideal for building educational tools, code playgrounds, and interactive coding environments within web applications.\n\nThis library heavily relies on the types from [codevideo-types](https://github.com/codevideo/codevideo-types)\n\n## Example Usage\n\n```typescript\nimport { VirtualAuthor } from '@fullstackcraftllc/codevideo-virtual-author';\n\n// Initialize a VirtualAuthor instance with initial existing command history\nconst virtualAuthor = new VirtualAuthor();\n\n// Apply speak action to the virtual author\nvirtualAuthor.applyActions([\n  { name: 'speak-before', value: \"Hi! I'm Chris, virtual CodeVideo author!\" }\n]);\n\n// Use the virtual author object\nconst actionsApplied = virtualAuthor.getActionsApplied();\nconst currentSpeechCaption = virtualAuthor.getCurrentSpeechCaption();\n\n// Log the final code and actions applied\nconsole.log('Actions applied:');\nconsole.log(actionsApplied);\nconsole.log('Current speech caption:');\nconsole.log(currentSpeechCaption); // \"Hi! I'm Chris, virtual CodeVideo author!\"\n```\n\n## Available Methods\n\n### `applyAction(action: IAction): void`\n\nApply a single action to the code.\n\n### `applyActions(actions: Array\u003cIAction\u003e): void`\n\nApply a series of actions to the virtual author.\n\n### `getActionsApplied(): Array\u003cIAction\u003e`\n\nGet the actions applied to the virtual author.\n\n### `getCurrentSpeechCaption(): string`\n\nGet the current speech caption of the virtual author. Returns an empty string if no speech caption is set.\n\n## Why?\n\nWhy do we need a seemingly useless class? This library, along with [`codevideo-virtual-code-block`](https://github.com/codevideo/codevideo-virtual-code-block) create the backbone of [`codevideo-virtual-code-editor`](https://github.com/codevideo/codevideo-virtual-code-editor) which are used to validate steps across the CodeVideo ecosystem. This is a small part of a larger project to create a declarative way to build, edit, and generate step by step educational video software courses.\n\nSee more at [codevideo.io](https://codevideo.io)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodevideo%2Fcodevideo-virtual-author","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodevideo%2Fcodevideo-virtual-author","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodevideo%2Fcodevideo-virtual-author/lists"}