ansys.dyna.core.__main__#
CLI for PyDyna.
- Usage:
python -m ansys.dyna.core agent –env cursor python -m ansys.dyna.core agent –env vscode –copy python -m ansys.dyna.core agent –env vscode –pointer python -m ansys.dyna.core agent –print
Attributes#
Functions#
|
Find workspace root by walking up from cwd. |
|
Get the package directory containing agent instructions. |
|
Get path to agent instructions file. |
|
Get path to extended agent documentation directory. |
|
Read the agent instructions from installed package. |
|
Rewrite relative links in content to work from copied location. |
|
Wrap content in Cursor rules MDC format. |
|
Add .agent/ to .gitignore. |
|
Load the manifest.json file, or return empty manifest. |
|
Save the manifest.json file. |
|
Add or update a package entry in the manifest. |
|
Generate README.md from manifest. |
|
Copy all agent instruction files to workspace with working links. |
|
Register a pointer-mode entry in the manifest. |
|
Update .github/copilot-instructions.md with a pointer. |
|
Update CLAUDE.md with a pointer. |
|
Handle --copy mode: copy all files with working links. |
|
Handle --pointer mode: just add pointer to installed package. |
|
Handle 'agent' subcommand. |
|
Main entry point for CLI. |
Module Contents#
- ansys.dyna.core.__main__.find_workspace_root() pathlib.Path | None[source]#
Find workspace root by walking up from cwd.
- ansys.dyna.core.__main__.get_package_dir() pathlib.Path[source]#
Get the package directory containing agent instructions.
- ansys.dyna.core.__main__.get_instructions_path() pathlib.Path[source]#
Get path to agent instructions file.
- ansys.dyna.core.__main__.get_extended_docs_dir() pathlib.Path[source]#
Get path to extended agent documentation directory.
- ansys.dyna.core.__main__.get_instructions_content() str[source]#
Read the agent instructions from installed package.
- ansys.dyna.core.__main__.rewrite_links_for_copy(content: str, subdir_name: str) str[source]#
Rewrite relative links in content to work from copied location.
- ansys.dyna.core.__main__.format_for_cursor(content: str, source_path: pathlib.Path) str[source]#
Wrap content in Cursor rules MDC format.
- ansys.dyna.core.__main__.ensure_gitignore(workspace: pathlib.Path) None[source]#
Add .agent/ to .gitignore.
- ansys.dyna.core.__main__.load_manifest(agent_dir: pathlib.Path) dict[source]#
Load the manifest.json file, or return empty manifest.
- ansys.dyna.core.__main__.save_manifest(agent_dir: pathlib.Path, manifest: dict) None[source]#
Save the manifest.json file.
- ansys.dyna.core.__main__.update_manifest_entry(manifest: dict, namespace: str, ecosystem: str, package_name: str, entry_file: str, extended_docs: list[str], mode: str, source_path: str) dict[source]#
Add or update a package entry in the manifest.
- ansys.dyna.core.__main__.generate_readme(agent_dir: pathlib.Path, manifest: dict) None[source]#
Generate README.md from manifest.
- ansys.dyna.core.__main__.copy_all_instructions(workspace: pathlib.Path, mode: str = 'copy') tuple[pathlib.Path, list[str]][source]#
Copy all agent instruction files to workspace with working links.
- ansys.dyna.core.__main__.register_pointer_in_manifest(workspace: pathlib.Path, mode: str = 'pointer') None[source]#
Register a pointer-mode entry in the manifest.
- ansys.dyna.core.__main__.update_copilot_instructions(workspace: pathlib.Path, pydyna_path: pathlib.Path, mode: str, extended_docs: list[str] | None = None) pathlib.Path[source]#
Update .github/copilot-instructions.md with a pointer.
- ansys.dyna.core.__main__.update_claude_instructions(workspace: pathlib.Path, pydyna_path: pathlib.Path, mode: str, extended_docs: list[str] | None = None) pathlib.Path[source]#
Update CLAUDE.md with a pointer.
- ansys.dyna.core.__main__.cmd_agent_copy(args: argparse.Namespace, workspace: pathlib.Path) int[source]#
Handle –copy mode: copy all files with working links.
- ansys.dyna.core.__main__.cmd_agent_pointer(args: argparse.Namespace, workspace: pathlib.Path) int[source]#
Handle –pointer mode: just add pointer to installed package.
- ansys.dyna.core.__main__.cmd_agent(args: argparse.Namespace) int[source]#
Handle ‘agent’ subcommand.