21 ms·
A-Shell: Terminal for iOS
- RodgerTheGreat 6y agoI can see that this tool in turn leverages ios_system, but neither A-shell nor the ios_system github repository appear to present an exhaustive list of the available commands. This seems like an obvious first step in improving documentation.
- jedieaston 6y agorunning help at the shell gives you a (rather friendly) list of available commands. Similar to termux, I believe.
- qubex 6y agoInvoking “help -l” will give you a full list of available commands.
- mbreese 6y agoThis is super interesting. It looks like a-shell is written by the same person as ios_system. It’s also used in Blink.sh for their loading screen.
- thesuperbigfrog 6y agoA-Shell looks very promising. If I were still using iOS, I would install it and try it out in a heartbeat. On Android, I love using Termux (https://termux.com/ https://termux.com/). If I have a computer in my pocket, I should be able to use it as a computer, not merely a consumption device
- cft 6y agoTermux is awesome. Using it even made me order a foldable Bluetooth keyboard, so i always have a dev environment in my pocket.
- simonh 6y agoYou could check out Pythonista, Codea, Javascript Anywhere, TechBASIC, DraftCode (for PHP) and Continuous (C# and F#). Those are all coding apps so you can program directly on the device. Several of them also enable packaging the programs you create for distribution on the App Store. Several of them also have built-in GUI authoring tools although I generally prefer to build my GUIs in code. Working Copy is an excellent GIT client and works well with many of the above and there are plenty of coding editors. There are also a plethora of non-programming creativity apps, many of which are useful for coding projects.
- airstrike 6y agoLink to git repo https://github.com/holzschu/a-shell https://github.com/holzschu/a-shell
- alexhutcheson 6y agoThis is extremely cool. Is there any documentation on what shell syntax this supports? I assume it's not running a standard shell like Bash or zsh. Edit: https://github.com/holzschu/ios_system/blob/master/README.md https://github.com/holzschu/ios_system/blob/master/README.md confirms its not running sh, bash, or zsh, and has some additional details on the available commands. I still think it would be nice for this to be more explicit, but the information is out there.
- kohtatsu 6y agoVery solid readme.
- 5- 6y agoLibTerm is very similar (also based on ios_system): https://libterm.app/ https://libterm.app/ iSH uses a completely different approach -- it's a custom x86+linux emulator that runs complete unaltered alpine linux userland: https://ish.app/ https://ish.app/
- GekkePrutser 6y agoYeah I notice that even the websites of LibTerm and A-Shell are almost the same. They use exactly the same icons for some items! I assume one is a fork of the other?
- aloknnikhil 6y agoSeems like both use this framework to generate the landing page https://github.com/emilbaehr/automatic-app-landing-page https://github.com/emilbaehr/automatic-app-landing-page
- willis936 6y agoI ctrl-F'd the comments for "LibTerm" because this looked identical and I was wondering what the differences were. I guess there aren't many.
- leoh 6y agoImpressive, do you know why they emulate x86 though?
- saagarjha 6y agoIf your question is “why emulate”, then the answer to that is “because creating pages of executable code is difficult to get past app review”. If you question is “why x86”, then see https://github.com/ish-app/ish/wiki/FAQ#q-why-does-ish-not-emulate-arm-or-some-other-architecture https://github.com/ish-app/ish/wiki/FAQ#q-why-does-ish-not-e...
- harperlee 6y agoish is cool but still has some rough edges - I could not run clojure for example, as java seems to choke on running over the emulator.
- jedisct1 6y agoI use iSH, that provides a complete Alpine Linux environment: https://ish.app https://ish.app A-Shell seems to be very limited and additional packages cannot be installed. What are uses cases for which A-Shell would be a better fit than iSH?
- robenkleene 6y agoIt’s in the App Store, for one.
- softwarejosh 6y agois that really valid here? i-sh is on testflight, the intersection of cant figure out testflight and can use a terminal must be pretty low.
- maxmcd 6y agoIsn't there an upper limit on the number testflight users?
- saagarjha 6y agoYes, 10,000. iSH is also distributed as an IPA that you can sign and install.
- maxmcd 6y agoDo you need a paid apple developer account to sign and install it?
- mmcwilliams 6y agoYou can sign it with a free developer account, but I believe that you have to re-sign every 7 days as opposed to every year with a paid developer account.
- 6y ago
- jlgaddis 6y agoJust this morning I realized I had a need for a decent SSH client for iOS, although I don't need something that includes vim, clang, and Lua, Python, and C, though. That's extreme overkill for my needs -- I'd just like the ability to log in to a few hosts (preferably using public key authentication!) and run various commands just like I normally do in a terminal. If anyone has any "favorites" they recommend, I'd be interested in hearing about them. I'd prefer something open-source (out of principle) but I'm certainly not opposed to paying a reasonable amount.
- anamexis 6y agoI love Blink, and it is open-source. https://blink.sh/ https://blink.sh/
- als0 6y agoI want to try it but $20 for a shell seems like a tough sell!
- anamexis 6y agoIt's definitely steep, but if you are doing serious work in the shell on iOS, it's worth it IMHO. I was traveling by motorcycle for 6 months and did all my dev work on an iPad using emacs over mosh on Blink, and it was a great experience.
- rhinoceraptor 6y agoIt’s open source if that makes you reconsider. It’s definitely worth supporting them IMO.
- maxgashkov 6y agoYou can build it yourself from source with Xcode. But this is one of the apps I cannot believe is not subscription-based. Author keeps up with changes in iOS and improves constantly. The cost is justified too as the market for terminal emulators is much smaller than general iOS audience.
- GekkePrutser 6y agoNice!!! What iOS really needs to make this useful though is a way to project to a proper screen and keyboard/mouse configuration. Like Samsung DeX. Kinda hoping this will happen as they are making the iPad Pros more like a computer.
- djrogers 6y agoiPadOS supports this completely, as long as the application is written with the external screen APIs in mind.
- thecybernerd 6y agoIs there any way I could use a USB C to DB9 console cable on an iPad Pro with this? I’m thinking this could be a great setup for working in the cramped data center.
- s800 6y agocheck into AirConsole. Works great, skip the cable. https://www.get-console.com/shop/ https://www.get-console.com/shop/ No relation.
- haddr 6y agoiSH is another good alternative, with alpine Linux and possibility to install packages. Still in beta though
- jsjohnst 6y agoWhy is the download so large I wonder? Almost 650mb app.
- fmajid 6y agoIt includes Python, clang and other utils.
- ken 6y ago"includes Python, Lua, JavaScript, C, C++ for programming and TeX (texlive 2019, including LuaTeX) for text processing." I'm actually surprised it's only about 650 MB. TeX (Live) alone is huge.
- ulzeraj 6y agoIt will ask if you want to download a 800MB package if you run the latex command so TeX is not really included in the main download.
- jsjohnst 6y agoLua is rather tiny. JavaScript and the executor for C/C++ (as the compiler compiles to WASM) are mostly Apple frameworks (JavaScript Core). Now Python and Clang are fairly big, but not usually 650mb big, I’d say 200mb is more likely. Now if TeX was included, totally agree, but as sibling comment indicated, it’s not.
- waynecochran 6y agoGreat! I'm glad Apple has changed its rules concerning having an embedded interpreter: https://news.ycombinator.com/item?id=14809096 https://news.ycombinator.com/item?id=14809096
- noodlesUK 6y agoHow does this compare to ish? I know ish translates x86 into ARM on iOS. How does this work?
- FullyFunctional 6y agoIt doesn't. It _interprets_ x86. There's a similar project to do this for RISC-V, but it's not on TestFlight. I assume this pick the LLVM IR? It's an interesting question what the optimal IR for this would be, but it would probably be higher level than this, maybe more like WASM or the Zinc (O'Caml IR).
- saagarjha 6y agoThe included commands for this are native code. The C compiler produces LLVM IR.
- FullyFunctional 6y agoI can't parse this, but the facts remain that the only JIT Apple allow is their own. Any other app cannot generate and run native code at runtime. Thus, apps are interpreting the immediate form (for iSH that 32-bit x86 and for A-Shell it's LLVM IR). iSH is threading, that is, the x86 code is translated into an IR consisting of pointers to the code that executes its interpretation. This is a technique older than FORTH and which may be the best you can do on iOS currently. A-Shell may do the same, I don't know. EDIT: updated with more details.
- deleted 6y ago[deleted]
- ulzeraj 6y agoIt hangs if I run ssh-keygen or ssh-keygen -t ed25519. Tested on a recent ipad pro and iphone x.
- killerpopiller 6y agosame here. Is this a bug or can't ssh be used at all?
- oddix 6y agoThis is a known bug that the author appears to be implementing a fix for: https://github.com/holzschu/a-shell/issues/14 https://github.com/holzschu/a-shell/issues/14
- vedosity 6y agoI was considering using lib-tex (the library implementing texlive 2019 for this shell) last week for an iOS app I’m working on that needs to generate basic LaTeX images. It’s really impressive, these programs running in A-Shell are modified by renaming their `main()` function and making sure global/static variables are cleaned up so they can run as a separate thread in-process instead of spawning a separate process. I decided to use the more limited KaTeX instead because it sounds like a maintenance nightmare, making sure nothing leaks and updating everything every time a new version comes out... I wonder if that process can be automated to a point where you could “lib-ize” any C/C++ project (sed replacing malloc/free with something that cleans up when the process “exits”, replacing exit/fork/etc, replacing static). I think that would really open up the number of interpreters available on iOS.
- hyperpallium 6y agoDoesn't Apple ToS forbid programming (excepting embedded lua etc)? Did that change? Android 10 is locking down http://termux.com http://termux.com, and wifi ipads have higher compute/$. If this works at full speed, I might get one.
- krallja 6y agoNo, Codea is a full featured Lua IDE for iOS, and there are lots of other programming environments too. What they prohibit is compilation to native code. If you have an interpreter (like lli, in this case), that’s fine.
- kennywinker 6y agoThat was not always the case. 2017 article about them easing restrictions on this: https://www.theregister.co.uk/2017/06/07/apple_relaxes_developer_rules/ https://www.theregister.co.uk/2017/06/07/apple_relaxes_devel...
- lioeters 6y agoWow, that was a few years back - I'm glad to learn about this change. Quoting (and reformatting for better understanding) below.. --- On June 5th of this year [2017], the Apple Developer Program License Agreement (which applies to both the iOS and Mac App Stores) was revised to: 3.3.2 ..Interpreted code may be downloaded to an Application but only so long as such code: (a) does not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store, (b) does not create a store or storefront for other code or applications, and (c) does not bypass signing, sandbox, or other security features of the OS. --- An Application that is a programming environment intended for use in learning how to program may download and run executable code so long as the following requirements are met: (i) no more than 80 percent of the Application’s viewing area or screen may be taken over with executable code, except as otherwise permitted in the Documentation, (ii) the Application must present a reasonably conspicuous indicator to the user within the Application to indicate that the user is in a programming environment, (iii) the Application must not create a store or storefront for other code or applications, and (iv) the source code provided by the Application must be completely viewable and editable by the user (e.g., no pre-compiled libraries or frameworks may be included with the code downloaded).
- kgarten 6y agoI personally love Blink https://blink.sh/ https://blink.sh/ it provides a great mosh client.
- xenihn 6y agoI haven't used either this or the one in the original submission. What differences stand out the most to you? I'll be trying both out later tonight, but I'm curious to know your thoughts.
- kgarten 6y agoI just downloaded a-shell so still playing with it. What I love about Blink is that it supports mosh and it includes tunnels, ssh-agent etc. out of the box (no need to install anything). It seems very well polished for the purpose of remote work. I have a mosh session open with our deep learning server in the lab 24h (works with network outage etc.). I assume you can setup the same on A-Shell. Will play with it and update here.
- strunz 6y agoBlink is great, but $20 for a terminal you might use occasionally or emergencies is pretty stiff for me personally.
- kgarten 6y agoIt's free and opensource on github (if you register as developer for apple). Edit: spelling error
- strunz 6y agoRegistering in the Apple Development program costs $99 (per year) too
- 847F5C7B 6y agoThat is no longer true. Registering for an account is free. you can get a signing key for testing (i.e. to build and run on your own device) for free also. You only need to pay if you want to publish to the App Store.
- stblack 6y agoIn this app, it appears we are operationally limited to /private/var/mobile/Containers/Data/Application/49F47295-F9D8-4FD7-8F34-redactedxxxx/ The default folder is /private/var/mobile/Containers/Data/Application/49F47295-F9D8-4FD7-8F34-redactedxxxx/Documents I am able to cd / and can see the following folders /Applications /bin /cores /dev /Developer /etc /Library /private /sbin /System /tmp /usr /var ... but can't cd into any of them. "permission denied". None of this is a surprise, of course.
- stblack 6y agoOdd there is no `which` command; this limits discovery. `python --version` returns 3.7.1. `curl --version` returns 7.54.0.
- jagged-chisel 6y agohelp -l
- pjot 6y agoFrom the README: https://github.com/holzschu/ios_system/blob/master/README.md https://github.com/holzschu/ios_system/blob/master/README.md Issues: In iOS, you cannot write in the ~ directory, only in ~/Documents/, ~/Library/ and ~/tmp. Most Unix programs assume the configuration files are in $HOME. So either you redefine $HOME to ~/Documents/ or you set configuration variables (using setenv) to some other place. This is done in the initializeEnvironment() function. Here's what I have: setenv PATH = $PATH:~/Library/bin:~/Documents/bin setenv PYTHONHOME = $HOME/Library/ setenv SSH_HOME = $HOME/Documents/ setenv CURL_HOME = $HOME/Documents/ setenv HGRCPATH = $HOME/Documents/.hgrc/ setenv SSL_CERT_FILE = $HOME/Documents/cacert.pem Your Mileage May Vary. Note that iOS already defines $HOME and $PATH.
- ceocoder 6y agoThis is very cool, over the years I've been using different apps - iSSH back in 2010/2011 and Terminus lately - to connect to servers over ssh/mosh but having a local working terminal would be great. Is there any way this can update Apple Notes? And > "A text-based user interface for a screen-based platform" Is that a play on "Limitless paper in paperless world" from a Dunder-Mifflin ad?[0] [0] https://www.youtube.com/watch?v=FIUSPM7xjAk https://www.youtube.com/watch?v=FIUSPM7xjAk
- addajones 6y agoTerminus is excellent for iOS. https://apps.apple.com/us/app/termius-ssh-client/id549039908 https://apps.apple.com/us/app/termius-ssh-client/id549039908
- abafazi 6y agoIsn't this just an SSH client?
- dmitshur 6y agoThis was fun to try as a little preview of what it’ll feel like to have an ARM-based MacBook. Bummer there’s no git¹. I was curious to try to install Go just to see how far I’d get before being blocked. Was able to download the source tarball and extract it (using curl and tar as 2 separate commands; piping curl into tar didn’t work). But then can’t execute make.bash because there’s no bash. [1] There's rationale and an alternative described at https://github.com/holzschu/ios_system#adding-more-commands https://github.com/holzschu/ios_system#adding-more-commands.
- 0x8BADF00D 6y agoIf you really want an ARM64 based development platform, why not get a Pinebook? Or something like the NVIDIA Jetson Nano? The philosophy of Apple is to link against their officially provided frameworks/SDKs. It's not meant to be a platform for open development.
- cpach 6y agomacOS is still a quite an open platform.
- oarsinsync 6y agoThe context was ARM64 based platforms. macOS isn't on an ARM64 based platforms (yet?).
- cpach 6y agoAh. My bad.
- terhechte 6y agoYou can try ish.app [1], which has support for a wide variety of tools (including git). I use it on iPad to work on a small C app that I use a lot. [2] [1] https://ish.app/ https://ish.app/ [2] https://github.com/terhechte/gitsi https://github.com/terhechte/gitsi
- namelosw 6y agoI jailbreak several iOS devices just to have terminal many years ago, and it was quite an interesting experience. I always hope Apple could let user access terminal in iOS, at least in developer mode. After all, it's still BSD based just like MacOS, and iPad Pro is so powerful but nowhere to go for a programmer. Sadly, it seems Apple doesn't really care about this.
- kennywinker 6y agoThis app is in the app store, so apple isn't actively blocking this kind of thing anymore, which is an improvement!
- namelosw 6y agoIndeed! I was just dreaming they could take even more steps :D
- liamcardenas 6y agoThis may be a dumb question... To my knowledge, the reason no “real” terminal exists for iOS is because it violates the App Store rules. It is prohibited to download and execute arbitrary code, with a few exceptions. One exception is JavaScript, which must be run inside of JavaScript Core [1]. What if someone simulated x86 and Linux _in JavaScript_ and then built a terminal and file system on top of it? Would that be in accordance with the App Store rules (since it would be sandboxed in Apple’s JS core)? Would it even be technically feasible? Or too slow for any serious usage? [1] from the App Store rules: 4.7 HTML5 Games, Bots, etc. Apps may contain or run code that is not embedded in the binary (e.g. HTML5-based games, bots, etc.), as long as code distribution isn’t the main purpose of the app, the code is not offered in a store or store-like interface, and provided that the software (1) is free or purchased using in-app purchase; (2) only uses capabilities available in a standard WebKit view (e.g. it must open and run natively in Safari without modifications or additional software); your app must use WebKit and JavaScript Core to run third-party software and should not attempt to extend or expose native platform APIs to third-party software; (3) is offered by developers that have joined the Apple Developer Program and signed the Apple Developer Program License Agreement; (4) does not provide access to real money gaming, lotteries, or charitable donations; (5) adheres to the terms of these App Review Guidelines (e.g. does not include objectionable content); and (6) does not offer digital goods or services for sale. Upon request, you must provide an index of software and metadata available in your app. It must include Apple Developer Program Team IDs for the providers of the software along with a URL which App Review can use to confirm that the software complies with the requirements above.
- ajconway 6y agoIt is not necessary to resort to JavaScript for the emulation, emulation and interpretation are allowed. App Store effectively forbids the usage of JIT (so VMs do not run as fast as one could expect) and running any code that’s not included in the package at the time you submit the app for review (with an exception for educational apps).
- liamcardenas 6y agoI’m not doubting you, but I don’t see where in the App Store rules it forbids JIT, other than the prohibition of running third-party code. Emulation and interpretation are allowed — if the code is first- or second- party. Educational apps are an interesting exception, but as I quoted in my patent comment, JavaScript is the other major one. So I wonder if JIT compilation and execution is possible under the rules in JavaScript? (Again, is that even feasible?)
- misrab 6y agoI'm seeing more and more dev tools being developed for mobile e.g. yesterday on HN: https://news.ycombinator.com/item?id=22968079 https://news.ycombinator.com/item?id=22968079 Seems like there's pent up demand for more hacker stuff on mobile! :) I wonder what this could mean for the direction of the mobile paradigm (move towards fewer walled gardens like app stores please?)
- letmelurkaround 6y agoThis is a great tool. Love it