diff --git a/docs/introduction/overview.mdx b/docs/introduction/overview.mdx index a89f207ed..45e6c0973 100644 --- a/docs/introduction/overview.mdx +++ b/docs/introduction/overview.mdx @@ -9,7 +9,40 @@ iconType: "solid" It provides a scriptable interface to a powerful, multi-lingual language server built on top of [Tree-sitter](https://tree-sitter.github.io/tree-sitter/). - +export const intoSnippet = `# grabs codebase content + +file = codebase.files[0] # or .get_file("test.py") +function = codebase.functions[0] # or .get_symbol("my_func") + +# print logs + +print(f'# of files: {len(codebase.files)}') +print(f'# of functions: {len(codebase.functions)}') + +# make edits + +file.edit('🌈' + file.content) # edit contents +function.rename('new_name') # rename +function.set_docstring('new docstring') # set docstring + +# ... etc. + +` + + ## Installation