├── docs ├── src │ ├── components │ │ ├── Logo.svelte │ │ ├── Footer.svelte │ │ ├── index.ts │ │ ├── Header.svelte │ │ ├── Hero.svelte │ │ ├── Features.svelte │ │ └── Docs.svelte │ ├── lib │ │ └── index.ts │ ├── routes │ │ ├── +page.svelte │ │ ├── docs │ │ │ ├── +page.svelte │ │ │ └── +layout.svelte │ │ └── +layout.svelte │ ├── app.d.ts │ ├── app.html │ └── app.css ├── .npmrc ├── README.md ├── .prettierignore ├── static │ ├── favicon.png │ └── docs │ │ └── getting-started.md ├── postcss.config.js ├── vite.config.ts ├── .prettierrc ├── .gitignore ├── tailwind.config.js ├── tsconfig.json ├── svelte.config.js └── package.json ├── .gitignore ├── icon.png ├── fonts ├── MesloLGS NF Bold.ttf ├── MesloLGS NF Italic.ttf ├── MesloLGS NF Regular.ttf ├── Fira Code Bold Nerd Font.ttf ├── MesloLGS NF Bold Italic.ttf ├── SauceCodeProNerdFont-Bold.ttf ├── VictorMonoNerdFont-Bold.ttf ├── VictorMonoNerdFont-Italic.ttf ├── VictorMonoNerdFont-Medium.ttf ├── SauceCodeProNerdFont-Medium.ttf ├── VictorMonoNerdFont-BoldItalic.ttf ├── Fira Code Medium Nerd Font Complete Mono.ttf ├── JetBrains Mono Bold Nerd Font Complete.ttf └── JetBrains Mono Medium Nerd Font Complete.ttf ├── .github ├── ISSUE_TEMPLATE │ ├── bug-report-2.md │ ├── feature_request.md │ └── bug_report.md └── FUNDING.yml ├── tsconfig.json ├── plugin.json ├── src ├── main.js ├── utils │ ├── constants.js │ ├── helpers.js │ ├── icons.js │ └── themes.js ├── addons │ └── ligatures.js ├── services │ └── AiService.js ├── styles │ └── style.scss └── core │ └── selectionCore.js ├── typings ├── settings.d.ts ├── index.d.ts ├── fsOperation.d.ts ├── editorManager.d.ts ├── editorFile.d.ts └── acode.d.ts ├── installServer.sh ├── License.md ├── package.json ├── esbuild.config.mjs ├── .vscode └── pack-zip.js ├── dist ├── main.css └── xterm.css ├── ChangeLog.md ├── readme.md └── pnpm-lock.yaml /docs/src/components/Logo.svelte: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | AcodeX.zip 3 | dist.zip 4 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Acodex Site 2 | 3 | Acodex site source code 4 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/icon.png -------------------------------------------------------------------------------- /docs/.prettierignore: -------------------------------------------------------------------------------- 1 | # Package Managers 2 | package-lock.json 3 | pnpm-lock.yaml 4 | yarn.lock 5 | -------------------------------------------------------------------------------- /docs/src/lib/index.ts: -------------------------------------------------------------------------------- 1 | // place files you want to import through the `$lib` alias in this folder. 2 | -------------------------------------------------------------------------------- /docs/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/docs/static/favicon.png -------------------------------------------------------------------------------- /docs/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {} 5 | } 6 | }; 7 | -------------------------------------------------------------------------------- /fonts/MesloLGS NF Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/MesloLGS NF Bold.ttf -------------------------------------------------------------------------------- /fonts/MesloLGS NF Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/MesloLGS NF Italic.ttf -------------------------------------------------------------------------------- /fonts/MesloLGS NF Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/MesloLGS NF Regular.ttf -------------------------------------------------------------------------------- /fonts/Fira Code Bold Nerd Font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/Fira Code Bold Nerd Font.ttf -------------------------------------------------------------------------------- /fonts/MesloLGS NF Bold Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/MesloLGS NF Bold Italic.ttf -------------------------------------------------------------------------------- /fonts/SauceCodeProNerdFont-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/SauceCodeProNerdFont-Bold.ttf -------------------------------------------------------------------------------- /fonts/VictorMonoNerdFont-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/VictorMonoNerdFont-Bold.ttf -------------------------------------------------------------------------------- /fonts/VictorMonoNerdFont-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/VictorMonoNerdFont-Italic.ttf -------------------------------------------------------------------------------- /fonts/VictorMonoNerdFont-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/VictorMonoNerdFont-Medium.ttf -------------------------------------------------------------------------------- /fonts/SauceCodeProNerdFont-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/SauceCodeProNerdFont-Medium.ttf -------------------------------------------------------------------------------- /fonts/VictorMonoNerdFont-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/VictorMonoNerdFont-BoldItalic.ttf -------------------------------------------------------------------------------- /fonts/Fira Code Medium Nerd Font Complete Mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/Fira Code Medium Nerd Font Complete Mono.ttf -------------------------------------------------------------------------------- /fonts/JetBrains Mono Bold Nerd Font Complete.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/JetBrains Mono Bold Nerd Font Complete.ttf -------------------------------------------------------------------------------- /fonts/JetBrains Mono Medium Nerd Font Complete.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/HEAD/fonts/JetBrains Mono Medium Nerd Font Complete.ttf -------------------------------------------------------------------------------- /docs/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig } from 'vite'; 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()] 6 | }); 7 | -------------------------------------------------------------------------------- /docs/src/components/Footer.svelte: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /docs/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 100, 6 | "plugins": ["prettier-plugin-svelte"], 7 | "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] 8 | } 9 | -------------------------------------------------------------------------------- /docs/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | # Output 4 | .output 5 | .vercel 6 | /.svelte-kit 7 | /build 8 | 9 | # OS 10 | .DS_Store 11 | Thumbs.db 12 | 13 | # Env 14 | .env 15 | .env.* 16 | !.env.example 17 | !.env.test 18 | 19 | # Vite 20 | vite.config.js.timestamp-* 21 | vite.config.ts.timestamp-* 22 | -------------------------------------------------------------------------------- /docs/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Header } from './Header.svelte'; 2 | export { default as Hero } from './Hero.svelte'; 3 | export { default as Features } from './Features.svelte'; 4 | export { default as Docs } from './Docs.svelte'; 5 | export { default as Footer } from './Footer.svelte'; 6 | -------------------------------------------------------------------------------- /docs/src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface PageState {} 9 | // interface Platform {} 10 | } 11 | } 12 | 13 | export {}; 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report-2.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 2 3 | about: 'A Simple template to report the bug for small bug or normal problem ' 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | Describe about your problem/bug ... 11 | 12 | 13 | Provide few details about your device(like Android version) , Plugin version. 14 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2016", 4 | "module": "commonjs", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "skipLibCheck": true, 10 | "outDir": "dist" 11 | }, 12 | "exclude": ["./dist/**/*", "./postcss.config.js"] 13 | } 14 | -------------------------------------------------------------------------------- /docs/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/src/components/Header.svelte: -------------------------------------------------------------------------------- 1 |
2 |
3 |

AcodeX

4 | 10 |
11 |
12 | -------------------------------------------------------------------------------- /docs/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: ['./src/**/*.{html,js,svelte,ts}'], 4 | theme: { 5 | extend: { 6 | colors: { 7 | primary: 'var(--primary)', 8 | secondary: 'var(--secondary)', 9 | accent: 'var(--accent)' 10 | }, 11 | animation: { 12 | 'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite' 13 | }, 14 | boxShadow: { 15 | accent: '0 0 15px 5px rgba(192, 132, 252, 0.2)' 16 | } 17 | } 18 | }, 19 | plugins: [require('@tailwindcss/typography')] 20 | }; 21 | -------------------------------------------------------------------------------- /plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "bajrangcoder.acodex", 3 | "name": "AcodeX - Terminal", 4 | "main": "dist/main.js", 5 | "version": "3.2.0", 6 | "readme": "readme.md", 7 | "icon": "icon.png", 8 | "files": [], 9 | "minVersionCode": 290, 10 | "license": "MIT", 11 | "keywords": ["terminal", "acodex", "termux"], 12 | "changelogs": "ChangeLog.md", 13 | "contributors": [], 14 | "author": { 15 | "name": "Raunak Raj", 16 | "email": "bajrangcoders@gmail.com", 17 | "url": "https://github.com/bajrangCoder/acode-plugin-acodex", 18 | "github": "bajrangCoder" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import AcodeX from "./AcodeX.js"; 2 | import plugin from "../plugin.json"; 3 | 4 | if (window.acode) { 5 | const acodePlugin = new AcodeX(); 6 | acode.setPluginInit( 7 | plugin.id, 8 | async (initUrl, $page, { cacheFileUrl, cacheFile }) => { 9 | const baseUrl = initUrl.endsWith("/") ? initUrl : `${initUrl}/`; 10 | acodePlugin.baseUrl = baseUrl; 11 | await acodePlugin.init($page, cacheFile, cacheFileUrl); 12 | }, 13 | acodePlugin.settingsObj, 14 | ); 15 | acode.setPluginUnmount(plugin.id, () => { 16 | acodePlugin.destroy(); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /docs/src/routes/docs/+page.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | Documentation - AcodeX 16 | 17 | 18 |
19 |

Documentation

20 |
21 | {@html content} 22 |
23 |
24 | -------------------------------------------------------------------------------- /docs/static/docs/getting-started.md: -------------------------------------------------------------------------------- 1 | # Getting Started with AcodeX 2 | 3 | Welcome to AcodeX, the powerful terminal integration for your code editor! 4 | 5 | ## Installation 6 | 7 | 1. Open your code editor's marketplace 8 | 2. Search for "AcodeX" 9 | 3. Click "Install" 10 | 4. Restart your editor 11 | 12 | ## Basic Usage 13 | 14 | To open the integrated terminal: 15 | 16 | - Use the keyboard shortcut: `Ctrl+K` 17 | - Or search for "Open Terminal" in the command palette 18 | 19 | ## Customization 20 | 21 | You can customize AcodeX in the settings: 22 | 23 | 1. Open the settings panel 24 | 2. Navigate to the "AcodeX" section 25 | 3. Adjust the settings to your liking 26 | 27 | Enjoy using AcodeX! 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when, etc [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.svelte-kit/tsconfig.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "checkJs": true, 6 | "esModuleInterop": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "resolveJsonModule": true, 9 | "skipLibCheck": true, 10 | "sourceMap": true, 11 | "strict": true, 12 | "moduleResolution": "bundler" 13 | } 14 | // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias 15 | // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files 16 | // 17 | // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes 18 | // from the referenced tsconfig.json - TypeScript does not merge them in 19 | } 20 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: bajrangCoder 4 | patreon: bajrangCoder 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: bajrangCoder 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /docs/src/routes/docs/+layout.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 18 |
19 | 20 |
21 |
22 | -------------------------------------------------------------------------------- /typings/settings.d.ts: -------------------------------------------------------------------------------- 1 | declare type fileBrowserSettings = { 2 | showHiddenFiles: string; 3 | sortByName: string; 4 | }; 5 | 6 | declare type searchAndFindSettings = { 7 | wrap: boolean; 8 | caseSensitive: boolean; 9 | regExp: boolean; 10 | }; 11 | 12 | declare class Settings { 13 | update( 14 | settings?: { [key: string]: any } | boolean, 15 | showToast?: boolean, 16 | saveFile?: boolean, 17 | ): Promise; 18 | reset(setting?: string): Promise; 19 | on( 20 | event: `update:${string}` | `update:${string}:after` | "reset", 21 | callback: () => void, 22 | ): void; 23 | off(event: "update" | "reset", callback: () => void): void; 24 | get(key: string): any; 25 | 26 | applyAnimationSetting(): Promise; 27 | applyLangSetting(): Promise; 28 | } 29 | -------------------------------------------------------------------------------- /docs/svelte.config.js: -------------------------------------------------------------------------------- 1 | //import adapter from '@sveltejs/adapter-auto'; 2 | import adapter from '@sveltejs/adapter-netlify'; 3 | import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; 4 | 5 | /** @type {import('@sveltejs/kit').Config} */ 6 | const config = { 7 | // Consult https://kit.svelte.dev/docs/integrations#preprocessors 8 | // for more information about preprocessors 9 | preprocess: vitePreprocess(), 10 | 11 | kit: { 12 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. 13 | // If your environment is not supported, or you settled on a specific environment, switch out the adapter. 14 | // See https://kit.svelte.dev/docs/adapters for more information about adapters. 15 | adapter: adapter() 16 | } 17 | }; 18 | 19 | export default config; 20 | -------------------------------------------------------------------------------- /docs/src/routes/+layout.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | AcodeX - Terminal 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |
22 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Smartphone (please complete the following information):** 27 | - Device: [e.g. Samsung M34] 28 | - OS: [e.g. Android 13] 29 | - Termux [from f-droid or GitHub or play store] 30 | - Version [e.g. 22] 31 | 32 | **Additional context** 33 | Add any other context about the problem here. 34 | -------------------------------------------------------------------------------- /docs/src/components/Hero.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |
8 |
11 | {version} 12 |
13 |
14 |

15 | Supercharge Your Code Editor 16 |

17 |

18 | AcodeX brings powerful terminal integration for seamless development, right where you need it. 19 |

20 | 24 | Get Started 25 | 26 |
27 |
28 | -------------------------------------------------------------------------------- /typings/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | 7 | declare var ace: AceAjax.Ace; 8 | 9 | declare global { 10 | interface Window { 11 | toast(message: string, duration: number): void; 12 | ASSETS_DIRECTORY: string; 13 | CACHE_STORAGE: string; 14 | DATA_STORAGE: string; 15 | PLUGIN_DIR: string; 16 | DOES_SUPPORT_THEME: boolean; 17 | IS_FREE_VERSION: boolean; 18 | KEYBINDING_FILE: string; 19 | ANDROID_SDK_INT: number; 20 | addedFolder: AddedFolder; 21 | } 22 | } 23 | 24 | interface AddedFolder { 25 | url: string; 26 | remove: () => void; 27 | $node: HTMLElement; 28 | reload: () => void; 29 | listState: Map; 30 | reloadOnResume: boolean; 31 | saveState: boolean; 32 | title: string; 33 | id: string; 34 | } 35 | 36 | export {}; 37 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite dev", 7 | "build": "vite build", 8 | "preview": "vite preview", 9 | "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 10 | "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", 11 | "lint": "prettier --check .", 12 | "format": "prettier --write ." 13 | }, 14 | "devDependencies": { 15 | "@sveltejs/adapter-auto": "^3.0.0", 16 | "@sveltejs/kit": "^2.20.6", 17 | "@sveltejs/vite-plugin-svelte": "^3.0.0", 18 | "autoprefixer": "^10.4.20", 19 | "postcss": "^8.4.47", 20 | "prettier": "^3.1.1", 21 | "prettier-plugin-svelte": "^3.1.2", 22 | "svelte": "^4.2.7", 23 | "svelte-check": "^4.0.0", 24 | "tailwindcss": "^3.4.13", 25 | "typescript": "^5.0.0", 26 | "vite": "^5.4.21" 27 | }, 28 | "type": "module", 29 | "dependencies": { 30 | "@sveltejs/adapter-netlify": "^4.3.4", 31 | "@tailwindcss/typography": "^0.5.15", 32 | "marked": "^14.1.2" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /installServer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Default to not installing GUI 4 | INSTALL_GUI=false 5 | 6 | # Check for arguments 7 | while [[ "$#" -gt 0 ]]; do 8 | case "$1" in 9 | --gui) INSTALL_GUI=true ;; 10 | esac 11 | shift 12 | done 13 | 14 | echo -e "\e[1;36m[*] Installing acodeX-server... \e[0m" 15 | curl -L https://raw.githubusercontent.com/bajrangCoder/acodex_server/main/install.sh | bash 16 | echo -e '\e[1;32m`acodeX-server` installed successfully. Run `axs` to start the server. \e[0m' 17 | 18 | # Only install GUI if the --gui flag was provided 19 | if $INSTALL_GUI; then 20 | echo -e "\e[1;36m[*] Installing GUI-related packages for acodeX-server...\e[0m" 21 | pkg install x11-repo -y 22 | pkg install tigervnc -y 23 | curl -L https://raw.githubusercontent.com/bajrangCoder/websockify_rs/main/install.sh | bash 24 | echo -e "\e[1;32mGUI packages for acodeX-server installed successfully. Run vncserver command and setup password to get started\e[0m" 25 | else 26 | echo -e "\e[1;33mSkipping GUI installation for acodeX-server. Use --gui flag to install later.\e[0m" 27 | fi 28 | -------------------------------------------------------------------------------- /typings/fsOperation.d.ts: -------------------------------------------------------------------------------- 1 | interface FsOperation { 2 | (url: string): FileSystem; 3 | } 4 | 5 | interface FileSystem { 6 | lsDir(): Promise; 7 | delete(): Promise; 8 | exists(): Promise; 9 | stat(): Promise; 10 | readFile(encoding: string | undefined): Promise; 11 | writeFile(data: FileContent): Promise; 12 | createFile(name: string, data: FileContent): Promise; 13 | createDirectory(name?: string): Promise; 14 | copyTo(dest: string): Promise; 15 | moveTo(dest: string): Promise; 16 | renameTo(newName: string): Promise; 17 | } 18 | 19 | interface FsFile { 20 | name: string; 21 | url: string; 22 | isFile: boolean; 23 | isDirectory: boolean; 24 | isLink: boolean; 25 | } 26 | 27 | interface FsStat { 28 | name: string; 29 | url: string; 30 | uri: string; // Deprecated 31 | isFile: boolean; 32 | isDirectory: boolean; 33 | isLink: boolean; 34 | length: number; 35 | lastModified: number; 36 | canRead: boolean; 37 | canWrite: boolean; 38 | } 39 | 40 | type FileContent = string | Blob | ArrayBuffer; 41 | -------------------------------------------------------------------------------- /License.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Raunak Raj 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acode-plugin-acodex", 3 | "version": "3.2.0", 4 | "description": "Terminal support for Acode", 5 | "main": "dist/main.js", 6 | "repository": "https://github.com/bajrangCoder/acode-plugin-terminal.git", 7 | "author": "Raunak Raj ", 8 | "license": "MIT", 9 | "dependencies": { 10 | "@novnc/novnc": "^1.5.0", 11 | "@xterm/addon-attach": "0.10.0-beta.1", 12 | "@xterm/addon-fit": "0.9.0-beta.1", 13 | "@xterm/addon-image": "^0.8.0", 14 | "@xterm/addon-search": "0.14.0-beta.1", 15 | "@xterm/addon-unicode11": "0.7.0-beta.1", 16 | "@xterm/addon-web-links": "0.10.0-beta.1", 17 | "@xterm/addon-webgl": "0.17.0-beta.1", 18 | "@xterm/xterm": "^5.5.0", 19 | "html-tag-js": "^1.9.2", 20 | "ollama": "^0.5.13" 21 | }, 22 | "devDependencies": { 23 | "esbuild": "^0.25.0", 24 | "esbuild-sass-plugin": "^2.16.1", 25 | "jszip": "^3.10.1" 26 | }, 27 | "scripts": { 28 | "dev": "node esbuild.config.mjs --serve", 29 | "build": "node esbuild.config.mjs" 30 | }, 31 | "browserslist": [ 32 | "> 0.25%, not dead" 33 | ], 34 | "resolutions": { 35 | "terser": ">=5.14.2 ", 36 | "glob-parent": ">=5.1.2" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /esbuild.config.mjs: -------------------------------------------------------------------------------- 1 | import * as esbuild from "esbuild"; 2 | import { sassPlugin } from "esbuild-sass-plugin"; 3 | import { exec } from "node:child_process"; 4 | 5 | const isServe = process.argv.includes("--serve"); 6 | 7 | // Function to pack the ZIP file 8 | function packZip() { 9 | exec("node .vscode/pack-zip.js", (err, stdout, stderr) => { 10 | if (err) { 11 | console.error("Error packing zip:", err); 12 | return; 13 | } 14 | console.log(stdout.trim()); 15 | }); 16 | } 17 | 18 | // Custom plugin to pack ZIP after build or rebuild 19 | const zipPlugin = { 20 | name: "zip-plugin", 21 | setup(build) { 22 | build.onEnd(() => { 23 | packZip(); 24 | }); 25 | }, 26 | }; 27 | 28 | // Base build configuration 29 | const buildConfig = { 30 | entryPoints: ["src/main.js"], 31 | bundle: true, 32 | minify: true, 33 | logLevel: "info", 34 | color: true, 35 | outdir: "dist", 36 | plugins: [zipPlugin, sassPlugin()], 37 | }; 38 | 39 | // Main function to handle both serve and production builds 40 | (async () => { 41 | if (isServe) { 42 | console.log("Starting development server..."); 43 | 44 | // Watch and Serve Mode 45 | const ctx = await esbuild.context(buildConfig); 46 | 47 | await ctx.watch(); 48 | const { host, port } = await ctx.serve({ 49 | servedir: ".", 50 | port: 3000, 51 | }); 52 | } else { 53 | console.log("Building for production..."); 54 | await esbuild.build(buildConfig); 55 | console.log("Production build complete."); 56 | } 57 | })(); 58 | -------------------------------------------------------------------------------- /typings/editorManager.d.ts: -------------------------------------------------------------------------------- 1 | declare var editorManager: EditorManager; 2 | 3 | type FileEvent = 4 | | "switch-file" 5 | | "rename-file" 6 | | "save-file" 7 | | "file-loaded" 8 | | "file-content-changed" 9 | | "add-folder" 10 | | "remove-folder" 11 | | "new-file" 12 | | "init-open-file-list" 13 | | "update"; 14 | 15 | interface EditorManager { 16 | editor: AceAjax.Editor; 17 | getFile(checkFor: string | number, type: "id" | "name" | "uri"): EditorFile; 18 | addFile(file: EditorFile): void; 19 | switchFile(id: string): void; 20 | activeFile: EditorFile; 21 | hasUnsavedFiles(): number | null; 22 | files: Array; 23 | container: HTMLElement; 24 | isScrolling: boolean; 25 | on(event: FileEvent, callback: () => void): void; 26 | off(event: FileEvent, callback: () => void): void; 27 | emit(event: FileEvent, ...args: any[]): any; 28 | } 29 | 30 | type SAFMode = "single" | "tree" | null; 31 | 32 | interface CursorPosition { 33 | row: number; 34 | column: number; 35 | } 36 | 37 | interface FoldOptions { 38 | start: CursorPosition; 39 | end: CursorPosition; 40 | placeholder: string; 41 | ranges: FoldOptions[]; 42 | } 43 | 44 | type FileAction = "VIEW" | "EDIT" | "SEND" | "RUN"; 45 | 46 | interface FileOptions { 47 | isUnsaved?: boolean; 48 | render?: boolean; 49 | id?: string; 50 | uri?: string; 51 | text?: string; 52 | editable?: boolean; 53 | deletedFile?: boolean; 54 | SAFMode?: SAFMode; 55 | encoding?: string; 56 | cursorPos?: CursorPosition; 57 | scrollLeft?: number; 58 | scrollTop?: number; 59 | folds?: FoldOptions[]; 60 | } 61 | -------------------------------------------------------------------------------- /.vscode/pack-zip.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const fs = require("fs"); 3 | const jszip = require("jszip"); 4 | 5 | const iconFile = path.join(__dirname, "../icon.png"); 6 | const pluginJSON = path.join(__dirname, "../plugin.json"); 7 | const distFolder = path.join(__dirname, "../dist"); 8 | let readmeDotMd = path.join(__dirname, "../readme.md"); 9 | let changelogs = path.join(__dirname, "../ChangeLog.md"); 10 | 11 | if (!fs.existsSync(readmeDotMd)) { 12 | readmeDotMd = path.join(__dirname, "../README.md"); 13 | } 14 | 15 | // create zip file of dist folder 16 | 17 | const zip = new jszip(); 18 | 19 | zip.file("icon.png", fs.readFileSync(iconFile)); 20 | zip.file("plugin.json", fs.readFileSync(pluginJSON)); 21 | zip.file("readme.md", fs.readFileSync(readmeDotMd)); 22 | zip.file("ChangeLog.md", fs.readFileSync(changelogs)); 23 | 24 | loadFile("", distFolder); 25 | 26 | zip 27 | .generateNodeStream({ type: "nodebuffer", streamFiles: true }) 28 | .pipe(fs.createWriteStream(path.join(__dirname, "../dist.zip"))) 29 | .on("finish", () => { 30 | console.log("Plugin dist.zip written."); 31 | }); 32 | 33 | function loadFile(root, folder) { 34 | const distFiles = fs.readdirSync(folder); 35 | distFiles.forEach((file) => { 36 | const stat = fs.statSync(path.join(folder, file)); 37 | 38 | if (stat.isDirectory()) { 39 | zip.folder(file); 40 | loadFile(path.join(root, file), path.join(folder, file)); 41 | return; 42 | } 43 | 44 | if (!/LICENSE.txt/.test(file)) { 45 | zip.file(path.join(root, file), fs.readFileSync(path.join(folder, file))); 46 | } 47 | }); 48 | } 49 | -------------------------------------------------------------------------------- /docs/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --primary: #8b5cf6; 7 | --secondary: #6366f1; 8 | --accent: #a78bfa; 9 | } 10 | 11 | body { 12 | @apply bg-gradient-to-b from-gray-900 to-black min-h-screen text-white; 13 | } 14 | 15 | .gradient-text { 16 | @apply text-transparent bg-clip-text bg-gradient-to-r from-primary to-secondary; 17 | } 18 | 19 | .gradient-bg { 20 | @apply bg-gradient-to-r from-primary to-secondary; 21 | } 22 | 23 | .feature-card { 24 | @apply bg-gray-800 p-6 rounded-lg transition-all duration-300 relative overflow-hidden; 25 | box-shadow: 26 | 0 4px 6px -1px rgba(0, 0, 0, 0.1), 27 | 0 2px 4px -1px rgba(0, 0, 0, 0.06); 28 | } 29 | 30 | .feature-card::before { 31 | content: ''; 32 | position: absolute; 33 | top: -50%; 34 | left: -50%; 35 | width: 200%; 36 | height: 200%; 37 | background: conic-gradient( 38 | transparent, 39 | var(--primary), 40 | var(--secondary), 41 | var(--accent), 42 | transparent 30% 43 | ); 44 | animation: rotate 8s linear infinite; 45 | } 46 | 47 | .feature-card::after { 48 | content: ''; 49 | position: absolute; 50 | inset: 2px; 51 | background: inherit; 52 | border-radius: inherit; 53 | } 54 | 55 | .feature-content { 56 | @apply relative z-10; 57 | } 58 | 59 | .badge { 60 | @apply bg-gray-700 py-1 px-3 rounded-full text-sm font-medium text-accent border border-accent; 61 | } 62 | 63 | .header-blur { 64 | @apply bg-gray-900 bg-opacity-80 backdrop-filter backdrop-blur-xl border-b border-gray-800; 65 | } 66 | 67 | @keyframes rotate { 68 | 0% { 69 | transform: rotate(0deg); 70 | } 71 | 100% { 72 | transform: rotate(360deg); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /typings/editorFile.d.ts: -------------------------------------------------------------------------------- 1 | //declare var EditorFile: EditorFile; 2 | 3 | declare class EditorFile { 4 | focusedBefore: boolean; 5 | focused: boolean; 6 | loaded: boolean; 7 | loading: boolean; 8 | deletedFile: boolean; 9 | session: AceAjax.IEditSession | null; 10 | encoding: string; 11 | readOnly: boolean; 12 | markChanged: boolean; 13 | 14 | constructor(filename?: string, options?: FileOptions); 15 | 16 | get id(): string; 17 | set id(value: string); 18 | 19 | get filename(): string; 20 | set filename(value: string); 21 | 22 | get location(): string | null; 23 | set location(value: string); 24 | 25 | get uri(): string; 26 | set uri(value: string); 27 | 28 | get eol(): "windows" | "unix"; 29 | 30 | set eol(value: "windows" | "unix"); 31 | 32 | get editable(): boolean; 33 | set editable(value: boolean); 34 | 35 | get isUnsaved(): boolean; 36 | set isUnsaved(value: boolean); 37 | 38 | get name(): string; 39 | 40 | get cacheFile(): string; 41 | 42 | get icon(): string; 43 | 44 | get tab(): HTMLElement; 45 | 46 | get SAFMode(): SAFMode; 47 | 48 | writeToCache(): Promise; 49 | 50 | isChanged(): Promise; 51 | 52 | canRun(): Promise; 53 | 54 | readCanRun(): Promise; 55 | 56 | writeCanRun(cb: () => boolean | Promise): Promise; 57 | 58 | remove(force?: boolean): Promise; 59 | 60 | save(): Promise; 61 | 62 | saveAs(): Promise; 63 | 64 | setMode(mode?: string): void; 65 | 66 | makeActive(): void; 67 | 68 | removeActive(): void; 69 | 70 | openWith(): void; 71 | 72 | editWith(): void; 73 | 74 | share(): void; 75 | 76 | runAction(): void; 77 | 78 | run(): void; 79 | 80 | runFile(): void; 81 | 82 | render(): void; 83 | 84 | on(event: FileEvent, callback: () => void): void; 85 | 86 | off(event: FileEvent, callback: () => void): void; 87 | } 88 | -------------------------------------------------------------------------------- /docs/src/components/Features.svelte: -------------------------------------------------------------------------------- 1 | 42 | 43 |
44 |
45 |

💥 Features

46 |
47 | {#each features as feature} 48 |
49 |
50 |

{feature.title}

51 |

{feature.description}

52 |
53 |
54 | {/each} 55 |
56 |
57 |
58 | -------------------------------------------------------------------------------- /src/utils/constants.js: -------------------------------------------------------------------------------- 1 | // ai models logo 2 | acode.addIcon("deepseek", "https://raw.githubusercontent.com/deepseek-ai/DeepSeek-Coder/main/pictures/home.png"); 3 | acode.addIcon("chatgpt", "https://upload.wikimedia.org/wikipedia/commons/0/04/ChatGPT_logo.svg"); 4 | acode.addIcon("gemini", "https://upload.wikimedia.org/wikipedia/commons/4/45/Gemini_language_model_logo.png"); 5 | 6 | export const GUI_VIEWER = false; 7 | export const IMAGE_RENDERING = false; 8 | export const ALLOW_TRANSPRANCY = false; 9 | export const SELECTION_HAPTICS = true; 10 | export const FONT_LIGATURES = true; 11 | export const CURSOR_BLINK = true; 12 | export const CURSOR_STYLE = ["block", "underline", "bar"]; 13 | export const CURSOR_INACTIVE_STYLE = [ 14 | "outline", 15 | "block", 16 | "bar", 17 | "underline", 18 | "none", 19 | ]; 20 | export const FONT_SIZE = 11; 21 | export const FONT_FAMILY = "MesloLGS NF Regular"; 22 | export const FONT_WEIGHT = [ 23 | "normal", 24 | "bold", 25 | "100", 26 | "200", 27 | "300", 28 | "400", 29 | "500", 30 | "600", 31 | "700", 32 | "800", 33 | "900", 34 | ]; 35 | export const SCROLLBACK = 1000; 36 | export const SCROLL_SENSITIVITY = 1000; 37 | export const TERMINAL_PADDING = 0; 38 | export const showTerminalBtnSize = 35; 39 | export const showTerminalBtn = true; // to hide/unhide show terminal button 40 | export const DEFAULT_THEME = "catppuccin"; 41 | export const THEME_LIST = [ 42 | "ayuDark", 43 | "ayuLight", 44 | "ayuMirage", 45 | "catppuccin", 46 | "dracula", 47 | "elementary", 48 | "everblush", 49 | "light", 50 | "material", 51 | "nekonakoDjancoeg", 52 | "oneDark", 53 | "sapphire", 54 | "siduckOneDark", 55 | "snazzy", 56 | "xterm", 57 | "wal", 58 | "custom", 59 | ]; 60 | 61 | export const AI_MODEL = "deepseek"; 62 | export const AVAILABLE_AI_MODELS = [ 63 | [ 64 | "deepseek", 65 | "Deepseek", 66 | "deepseek", 67 | true 68 | ], 69 | [ 70 | "chatgpt", 71 | "ChatGPT", 72 | "chatgpt", 73 | true 74 | ], 75 | [ 76 | "gemini-pro", 77 | "Gemini Flash Lite", 78 | "gemini", 79 | true 80 | ], 81 | [ 82 | "local-llm", 83 | "Local LLM(ollama)", 84 | "icon phone_android", 85 | true 86 | ] 87 | ]; 88 | -------------------------------------------------------------------------------- /src/utils/helpers.js: -------------------------------------------------------------------------------- 1 | export function isTouchDevice() { 2 | return "ontouchstart" in window || navigator.maxTouchPoints > 0; 3 | } 4 | 5 | export function transparentColor(element) { 6 | const currentBackgroundColor = 7 | window.getComputedStyle(element).backgroundColor; 8 | const rgbValues = currentBackgroundColor.match(/\d+/g); 9 | const currentAlpha = Number.parseFloat(rgbValues[3]) || 1.0; 10 | return `rgba(${rgbValues[0]}, ${rgbValues[1]}, ${rgbValues[2]}, 0.5)`; 11 | } 12 | 13 | export function filterTermInputData(data) { 14 | /** 15 | * Function to filter out non-printable characters and control sequences 16 | **/ 17 | let filteredData = ""; 18 | for (let i = 0; i < data.length; i++) { 19 | const charCode = data.charCodeAt(i); 20 | if ( 21 | (charCode >= 32 && charCode <= 126) || 22 | charCode === 13 || // Carriage return (Enter) 23 | charCode === 8 // Backspace 24 | ) { 25 | filteredData += data[i]; 26 | } 27 | } 28 | return filteredData; 29 | } 30 | 31 | export function convertPath(path) { 32 | if (path.startsWith("content://com.termux.documents/tree")) { 33 | const termuxPath = path 34 | .split("::")[1] 35 | .substring(0, path.split("::")[1].lastIndexOf("/")) 36 | .replace(/^\/data\/data\/com\.termux\/files\/home/, "$HOME"); 37 | return termuxPath; 38 | } 39 | if (path.startsWith("file:///storage/emulated/0/")) { 40 | const sdcardPath = `/sdcard${path 41 | .substr("file:///storage/emulated/0".length) 42 | .replace(/\.[^/.]+$/, "") 43 | .split("/") 44 | .slice(0, -1) 45 | .join("/")}/`; 46 | return sdcardPath; 47 | } 48 | if ( 49 | path.startsWith( 50 | "content://com.android.externalstorage.documents/tree/primary", 51 | ) 52 | ) { 53 | const androidPath = `/sdcard/${path 54 | .split("::primary:")[1] 55 | .substring(0, path.split("::primary:")[1].lastIndexOf("/"))}`; 56 | return androidPath; 57 | } 58 | return false; 59 | } 60 | 61 | export function hexToTransparentRGBA(hex, alpha) { 62 | // Remove the hash character if it's present 63 | const hexValue = hex.replace("#", ""); 64 | 65 | // Parse the hex value to RGB 66 | const r = Number.parseInt(hexValue.substring(0, 2), 16); 67 | const g = Number.parseInt(hexValue.substring(2, 4), 16); 68 | const b = Number.parseInt(hexValue.substring(4, 6), 16); 69 | 70 | // Return the RGBA string with the specified alpha value 71 | return `rgba(${r}, ${g}, ${b}, ${alpha})`; 72 | } 73 | -------------------------------------------------------------------------------- /docs/src/components/Docs.svelte: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Documentation

4 |
5 |
8 |

Quick Start

9 |
    10 |
  1. Install AcodeX from your code editor's marketplace
  2. 11 |
  3. Open the AcodeX settings and configure your preferences
  4. 12 |
  5. Use the keyboard shortcut (default: Ctrl+k) to open the integrated terminal
  6. 13 |
  7. Start coding with enhanced terminal capabilities!
  8. 14 |
15 |
16 |
19 |

Acknowledgments

20 |
    21 |
  • 22 | xtermjs: Terminal frontend used in AcodeX 23 |
  • 24 |
  • 25 | Termux: Terminal backend for AcodeX 26 |
  • 27 |
  • 28 | noVnc: Used in running gui apps 29 |
  • 30 |
31 |
32 |
35 |

Support Project

36 |
    37 |
  • 38 | Buy Me A Coffee 39 |
  • 40 |
  • 41 | Buy Me a Coffee at ko-fi.com 42 |
  • 43 |
44 |
45 |
46 | 54 |
55 |
56 | -------------------------------------------------------------------------------- /src/addons/ligatures.js: -------------------------------------------------------------------------------- 1 | export default class LigaturesAddon { 2 | constructor(options = {}) { 3 | // fallback ligatures if a font does not support ligatures natively 4 | this._fallbackLigatures = 5 | options.fallbackLigatures || 6 | [ 7 | "<--", 8 | "<---", 9 | "<<-", 10 | "<-", 11 | "->", 12 | "->>", 13 | "-->", 14 | "--->", 15 | "<==", 16 | "<===", 17 | "<<=", 18 | "<=", 19 | "=>", 20 | "=>>", 21 | "==>", 22 | "===>", 23 | ">=", 24 | ">>=", 25 | "<->", 26 | "<-->", 27 | "<--->", 28 | "<---->", 29 | "<=>", 30 | "<==>", 31 | "<===>", 32 | "<====>", 33 | "<~~", 34 | "<~", 35 | "~>", 36 | "~~>", 37 | "::", 38 | ":::", 39 | "==", 40 | "!=", 41 | "===", 42 | "!==", 43 | ":=", 44 | ":-", 45 | ":+", 46 | "<*", 47 | "<*>", 48 | "*>", 49 | "<|", 50 | "<|>", 51 | "|>", 52 | "+:", 53 | "-:", 54 | "=:", 55 | ":>", 56 | "++", 57 | "+++", 58 | "