{"_id":"@abir-taheer/tree-sitter-ipython","name":"@abir-taheer/tree-sitter-ipython","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@abir-taheer/tree-sitter-ipython","version":"0.0.1","description":"IPython grammar for tree-sitter (extends Python with magic support)","main":"bindings/node","types":"bindings/node","exports":{".":{"types":"./bindings/node/index.d.ts","require":"./bindings/node/index.js","default":"./bindings/node/index.js"},"./grammar":"./grammar.js","./package.json":"./package.json"},"keywords":["incremental","parsing","parser","tree-sitter","ipython","jupyter","python","magic"],"repository":{"type":"git","url":"git+https://github.com/abir-taheer/tree-sitter-ipython.git"},"license":"MIT","dependencies":{"node-addon-api":">=7.0.0","node-gyp-build":">=4.0.0"},"devDependencies":{"tree-sitter-cli":">=0.22.0","tree-sitter-python":">=0.21.0","prebuildify":">=6.0.0"},"peerDependencies":{"tree-sitter":">=0.21.0"},"peerDependenciesMeta":{"tree-sitter":{"optional":true}},"scripts":{"install":"node-gyp-build","build":"tree-sitter generate && node-gyp rebuild","generate":"tree-sitter generate","test":"tree-sitter test","prebuild":"prebuildify --napi --strip"},"_id":"@abir-taheer/tree-sitter-ipython@0.0.1","gitHead":"c1158b2ab89771c1e729900db4b9199979736c8b","bugs":{"url":"https://github.com/abir-taheer/tree-sitter-ipython/issues"},"homepage":"https://github.com/abir-taheer/tree-sitter-ipython#readme","_nodeVersion":"20.18.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-xgQ+SPRDPOZK1PHBC68OXIylqIn1uE+A9ROAlnAjLa0GOjuM+SJj7D9pzvh6WkpLdRQfToVWwxICaXDYqrWzXg==","shasum":"8eb1353ec31ffc579fd9eddd4b6cedee9000558b","tarball":"https://registry.npmjs.org/@abir-taheer/tree-sitter-ipython/-/tree-sitter-ipython-0.0.1.tgz","fileCount":19,"unpackedSize":4268316,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD1p4NKIp1Bgh4hWFKZpsGS/zUHlHYLNn6WMJs7Yo3aNQIgIeD0I/3jLm2tBYfTqVb5kRJIFUcbF8e0007iNJ67140="}]},"_npmUser":{"name":"abir-taheer","email":"abir@taheer.me"},"directories":{},"maintainers":[{"name":"abir-taheer","email":"abir@taheer.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tree-sitter-ipython_0.0.1_1768456640044_0.9203086428922533"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-15T05:57:19.986Z","0.0.1":"2026-01-15T05:57:20.288Z","modified":"2026-01-15T05:57:20.456Z"},"maintainers":[{"name":"abir-taheer","email":"abir@taheer.me"}],"description":"IPython grammar for tree-sitter (extends Python with magic support)","homepage":"https://github.com/abir-taheer/tree-sitter-ipython#readme","keywords":["incremental","parsing","parser","tree-sitter","ipython","jupyter","python","magic"],"repository":{"type":"git","url":"git+https://github.com/abir-taheer/tree-sitter-ipython.git"},"bugs":{"url":"https://github.com/abir-taheer/tree-sitter-ipython/issues"},"license":"MIT","readme":"# tree-sitter-ipython\n\nA tree-sitter grammar for IPython/Jupyter that extends tree-sitter-python to support magic commands and shell escapes.\n\n## Features\n\n- **Line Magics** (`%`): `%matplotlib inline`, `%timeit x = 1`, `%pwd`\n- **Cell Magics** (`%%`): `%%time`, `%%bash`, `%%writefile test.py`\n- **Shell Escapes** (`!`): `!pip install pandas`, `!ls -la`\n- Full Python syntax support (inherited from tree-sitter-python)\n\n## Installation\n\n```bash\nnpm install @abir-taheer/tree-sitter-ipython\n```\n\n## Usage\n\n```javascript\nconst Parser = require('tree-sitter');\nconst IPython = require('@abir-taheer/tree-sitter-ipython');\n\nconst parser = new Parser();\nparser.setLanguage(IPython);\n\nconst code = `\n%matplotlib inline\nimport pandas as pd\n!pip install numpy\n%%time\nx = sum(range(1000))\n`;\n\nconst tree = parser.parse(code);\nconsole.log(tree.rootNode.toString());\n```\n\n## Node Types\n\n### Line Magic\n```\n(line_magic\n  (magic_operator)      ; the % symbol\n  name: (magic_name)    ; command name like \"matplotlib\"\n  arguments: (magic_arguments))  ; optional arguments like \"inline\"\n```\n\n### Cell Magic\n```\n(cell_magic\n  (cell_magic_operator) ; the %% symbol\n  name: (magic_name)    ; command name like \"time\"\n  arguments: (magic_arguments))  ; optional arguments\n```\n\n### Shell Escape\n```\n(shell_escape\n  (shell_operator)      ; the ! symbol\n  command: (shell_content))  ; the shell command\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Generate parser\nnpm run generate\n\n# Build native module\nnpm run build\n\n# Run tests\nnpm test\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-d3253b3b4302a12818b3021f11323485"}